It
it
s are the examples of the spec. A Description
holds a group of it
s, where each it
has at least one expectation.
An it
has the form of
it("description string", _ {...})
An it
can also have an implicit description that is generated by the contained expectation
it(_{...})
Important
Take note of the _
. This is used whenever you write an it
, similar to $
for describe
.
Each it
is run as part of the containing parent Description
, whether that be the toplevel
describe
or an explain
.
So for example,
describe an_example_it("An example of an it", $ {
it("looks like this", {...});
});