Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix formatting for relish

  • Loading branch information...
commit df607ea2aee4de56ffcfdd60ac93837998ff842c 1 parent 37e095c
@jredville jredville authored
View
20 features/argument_matchers/README.md
@@ -4,20 +4,20 @@ Argument matchers can be used:
* In stubs to constrain the scope of the stubbed method
- obj.stub(:foo).with(:bar) do |arg|
- #do something for :bar
- end
- obj.stub(:foo).with(:baz) do |arg|
- #do something for :baz
- end
+ obj.stub(:foo).with(:bar) do |arg|
+ #do something for :bar
+ end
+ obj.stub(:foo).with(:baz) do |arg|
+ #do something for :baz
+ end
* In expectations to validate the arguments that should be received in a method call
- #create a double
- obj = double()
+ #create a double
+ obj = double()
- #expect a message with given args
- obj.should_receive(:message).with('an argument')
+ #expect a message with given args
+ obj.should_receive(:message).with('an argument')
If more control is needed, one can use a block
View
4 features/argument_matchers/type_matchers.feature
@@ -1,6 +1,8 @@
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
Given a file named "stub_an_instance_of_args_spec.rb" with:
Please sign in to comment.
Something went wrong with that request. Please try again.