Permalink
Browse files

README - recommend eq over ==

  • Loading branch information...
dchelimsky committed Oct 14, 2012
1 parent f4e53a9 commit 13d69c3d96d62d4b359472009c5aff11cff2022c
Showing with 5 additions and 1 deletion.
  1. +5 −1 README.md
View
@@ -56,6 +56,10 @@ actual.should == expected # passes if actual == expected
actual.should eql(expected) # passes if actual.eql?(expected)
```
+Note: we recommend the `eq` matcher over `==` to avoid Ruby's "== in a
+useless context" warning when the `==` matcher is used anywhere but the
+last statement of an example.
+
### Identity
```ruby
@@ -76,8 +80,8 @@ actual.should be_within(delta).of(expected)
### Regular expressions
```ruby
-actual.should =~ /expression/
actual.should match(/expression/)
+actual.should =~ /expression/
```
### Types/classes

0 comments on commit 13d69c3

Please sign in to comment.