Skip to content

Commit

Permalink
fix formatting for relish
Browse files Browse the repository at this point in the history
  • Loading branch information
jredville committed Aug 10, 2012
1 parent 37e095c commit df607ea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 10 additions & 10 deletions features/argument_matchers/README.md
Expand Up @@ -4,20 +4,20 @@ Argument matchers can be used:


* In stubs to constrain the scope of the stubbed method * In stubs to constrain the scope of the stubbed method


obj.stub(:foo).with(:bar) do |arg| obj.stub(:foo).with(:bar) do |arg|
#do something for :bar #do something for :bar
end end
obj.stub(:foo).with(:baz) do |arg| obj.stub(:foo).with(:baz) do |arg|
#do something for :baz #do something for :baz
end end


* In expectations to validate the arguments that should be received in a method call * In expectations to validate the arguments that should be received in a method call


#create a double #create a double
obj = double() obj = double()


#expect a message with given args #expect a message with given args
obj.should_receive(:message).with('an argument') obj.should_receive(:message).with('an argument')


If more control is needed, one can use a block If more control is needed, one can use a block


Expand Down
4 changes: 3 additions & 1 deletion features/argument_matchers/type_matchers.feature
@@ -1,6 +1,8 @@
Feature: stub with argument constraints Feature: stub with argument constraints


You can further specify the behavior by constraining the type, format and/or number of arguments with the #with() method chained off of #stub() You can further specify the behavior by constraining the type,
format and/or number of arguments with the `#with()` method
chained off of `#stub()`


Scenario: an_instance_of argument matcher Scenario: an_instance_of argument matcher
Given a file named "stub_an_instance_of_args_spec.rb" with: Given a file named "stub_an_instance_of_args_spec.rb" with:
Expand Down

0 comments on commit df607ea

Please sign in to comment.