[Rspec-users] 1 should be 2. huh?
micah at 8thlight.com
Tue Oct 24 09:43:31 EDT 2006
There's another quirk I wanted to bring up. It's about the failure
message with should_equal and should_be.
When they fail they yield messages like:
1 should equal 2
nil should not be nil
When I'm caught off guard, which can be often, these messages confuse
me. 1 should equal 2? No it shouldn't. nil should not be nil? But
they are the same!
You get my drift? When taken out side the context of a
specification, these statements are just absurd.
In my humble opinion, these messages should include their context and
read like this:
x should equal 2 but was 1
a should not be nil but was nil
I realize there might be an issue printing the expression that gets
evaluated, but you guys have done some cool magic to this point.
Have you got a bit more up your sleeves?
8th Light, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rspec-users