Permalink
Browse files

Remove cuke references to "should be ==" and "should be ===".

should == and should === work just as well.
  • Loading branch information...
1 parent a553cfc commit 831403a4fa6e2bab9b867f3a421c7a4b17ebc173 @myronmarston myronmarston committed Nov 22, 2010
Showing with 1 addition and 11 deletions.
  1. +1 −11 features/matchers/be.feature
@@ -6,12 +6,10 @@ Feature: be matchers
* obj.should be_false # passes if obj is falsey (nil or false)
* obj.should be_nil # passes if obj is nil
* obj.should be # passes if obj is not nil
- * obj.should be == expected # passes if obj == expected
* obj.should be < expected # passes if obj < expected
* obj.should be > expected # passes if obj > expected
* obj.should be <= expected # passes if obj <= expected
* obj.should be >= expected # passes if obj >= expected
- * obj.should be === expected # passes if obj === expected
Scenario: be_true matcher
Given a file named "be_true_spec.rb" with:
@@ -125,35 +123,27 @@ Feature: be matchers
Given a file named "be_operators_spec.rb" with:
"""
describe 17 do
- it { should be == 17 }
it { should be < 20 }
it { should be > 15 }
it { should be <= 17 }
it { should be >= 17 }
- it { should_not be == 16 }
it { should_not be < 15 }
it { should_not be > 20 }
it { should_not be <= 16 }
it { should_not be >= 18 }
- specify { String.should be === "a string" }
- specify { String.should_not be === :a_symbol }
# deliberate failures
- it { should be == 16 }
it { should be < 15 }
it { should be > 20 }
it { should be <= 16 }
it { should be >= 18 }
- specify { String.should be === :a_symbol }
end
"""
When I run "rspec be_operators_spec.rb"
Then the output should contain all of these:
- | 18 examples, 6 failures |
- | expected == 16, got 17 |
+ | 12 examples, 4 failures |
| expected < 15, got 17 |
| expected > 20, got 17 |
| expected <= 16, got 17 |
| expected >= 18, got 17 |
- | expected === a_symbol, got String |

0 comments on commit 831403a

Please sign in to comment.