Skip to content

Commit

Permalink
rename feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Oct 10, 2010
1 parent 22d41fb commit 08265c8
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions features/matchers/define_matcher_with_fluent_interface.feature
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
Feature: define matcher
Feature: define matcher with fluent interface

In order to express my domain clearly in my code examples
As an RSpec user
I want to define matchers with fluent interfaces
Use the chain() method to define matchers with a fluent interface.

Scenario: one additional method
Scenario: chained method with argumetn
Given a file named "between_spec.rb" with:
"""
RSpec::Matchers.define :be_bigger_than do |first|
def but_smaller_than(second)
@second = second
self
end
match do |actual|
(actual > first) && (actual < @second)
end
chain :but_smaller_than do |second|
@second = second
end
end
describe 5 do
it { should be_bigger_than(4).but_smaller_than(6) }
end
"""
When I run "rspec ./between_spec.rb --format documentation"
When I run "rspec between_spec.rb --format documentation"
Then the output should contain "1 example, 0 failures"
And the output should contain "should be bigger than 4"

0 comments on commit 08265c8

Please sign in to comment.