BDD RSpec describe() it() 之二

he describe( ) method
The describe( ) method takes an arbitrary number of arguments and an
optional block, and returns a subclass of Spec::Example::ExampleGroup.2
We generally only use one or two arguments, which represent the facet
of behaviour that we wish to describe. They might describe an object,
perhaps in a pre-defined state, or perhaps a subset of the behaviour
we can expect from that object. Let’s look at a few examples, with the
output they produce so we can get an idea of how the arguments relate
to each other.


                                              [size=medium] Both it( ) and specify( ) are
actually aliases of the example( ) method, which creates an example.
[/size]

你可能感兴趣的:(idea,rspec)