Skip to content

Commit

Permalink
add example of explicit stub after as_null_object
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Dec 7, 2010
1 parent a063713 commit 80dbde5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/rspec/mocks/null_object_mock_spec.rb
Expand Up @@ -26,6 +26,11 @@ module Mocks
@double.should respond_to(:any_message_it_gets)
end

it "allows explicit stubs" do
@double.stub(:foo) { "bar" }
@double.foo.should eq("bar")
end

it "allows explicit expectation" do
@double.should_receive(:something)
@double.something
Expand Down

0 comments on commit 80dbde5

Please sign in to comment.