Clean up formatting for Relish #173

Merged
merged 1 commit into from Aug 10, 2012
Jump to file or symbol
Failed to load files and symbols.
+13 −11
Split
@@ -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
@@ -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: