method

equal

Importance_1
RSpec latest stable (1.2.8) - 0 notes - Class: Spec::Matchers
equal(expected) public

Passes if actual and expected are the same object (object identity).

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.

Examples

  5.should equal(5) #Fixnums are equal
  "5".should_not equal("5") #Strings that look the same are not the same object
Show source
Register or log in to add new notes.