Guest User

Untitled

a guest
Jun 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. target.should ==(expected value)
  2. target.should eql(expected value)
  3. target.should equal(expected value)
  4. target.should !=(expected value)
  5.  
  6. target.should be_true # Passes if target == true
  7. target.should be_false # Passes if target == false
  8. target.should be_nil # Passes if target.nil?
  9. target.should exist # Passes if target.exist?
  10.  
  11. target.should be_a(expected) #Passes if target.kind_of?(expected)
  12.  
  13. # Array Matchers
  14. target.should have(number).named_collection__or__sugar
  15. target.should have_at_least(number).items
  16. target.should have_at_most(number).items
  17. target.should have_exactly(number).items
  18. target.should include(expected)
Add Comment
Please, Sign In to add comment