Rspec what is the differencec (specify and it)?

hi,

I just started to learn Rspec, and it is really wonderful framework to
test all my code :slight_smile:

But I want to know what is the difference between these two testing
methods.

describe User do
it “blah blah” do
end
end

context User do
specify “blah blah” do
end
end

/Thanks

On Sun, 7 Oct 2007 10:25:24 +0200, Jamal S. wrote:

end

end

I believe they do the same thing under the covers. RSpec originally
used
the “context/specify” pair, and somewhere on the road to 1.0 decided
that
“describe/it” was a nicer DSL, but context/specify is still supported.
I
also seem to recall that some prefer context/specify to, er, describe
certain instances, but I can’t remember which or why. Purely a
readability/semantic though, though, not a functional difference.


Jay L. |
Boston, MA | My character doesn’t like it when they
Faster: jay at jay dot fm | cry or shout or hit.
http://www.jay.fm | - Kristoffer

Thanks, so “describe” and “it” are just alias :slight_smile:

On 10/7/07, Jamal S. [email protected] wrote:

Thanks, so “describe” and “it” are just alias :slight_smile:

Actually, “context” and “specify” are the aliases of “describe” and
“it”.