To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!More about adding a collaborator
Calling the original method
You can use
and_call_original on the fluent interface
to "pass through" the received message to the original method.
- expect a message
a file named "call_original_spec.rb" with:
class Addition def self.two_plus_two 4 end end describe "and_call_original" do it "delegates the message to the original implementation" do Addition.should_receive(:two_plus_two).and_call_original Addition.two_plus_two.should eq(4) end end
- the examples should all pass
Last published 6 months ago by myronmarston.
RSpec Mocks settings