[rspec-devel] [ rspec-Bugs-7429 ] should_equal fails, comparing 2 identical hash tables
noreply at rubyforge.org
noreply at rubyforge.org
Sat Dec 23 23:10:45 EST 2006
Bugs item #7429, was opened at 2006-12-23 20:10
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797
Category: expectation module
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Steve Jorgensen (jorgens)
Assigned to: Nobody (None)
Summary: should_equal fails, comparing 2 identical hash tables
Initial Comment:
If I try to use should_equal with hash tables, it always results in a failure, even when the hash tables have identical contents, and the Ruby == operator returns true for the same comparison.
Given a file, test.rb as follows...
context "foo" do
specify "xxx" do
{:v => ''}.should_equal :v => ''
end
end
...
C:\1home>spec test.rb
F
1)
'foo xxx' FAILED
{:v=>""} should equal {:v=>""}
./test.rb:4:
Finished in 0.0 seconds
1 specification, 1 failure
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7429&group_id=797
More information about the rspec-devel
mailing list