Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

README - recommend eq over ==

  • Loading branch information...
commit 13d69c3d96d62d4b359472009c5aff11cff2022c 1 parent f4e53a9
@dchelimsky dchelimsky authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 README.md
View
6 README.md
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.