eql(expected) public

Passes if actual and expected are of equal value, but not necessarily the same object.

See <a href="http://www.ruby-doc.org/core/classes/Object.html#M001057">http://www.ruby-doc.org/core/classes/Object.html#M001057</a> for more information about equality in Ruby.


  5.should eql(5)
  5.should_not eql(3)
Show source
Register or log in to add new notes.
April 22, 2011
0 thanks

Eql equals ==

Use eql to compare values as you would use ==:

"test".should eql "test" #=> pass
"test".should == "test" #=> pass

Do not confuse with equal which compares objects.