Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add example of explicit stub after as_null_object

  • Loading branch information...
commit 80dbde59a480c8b74a1c51e2a27d3e06b8942be7 1 parent a063713
@dchelimsky dchelimsky authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 spec/rspec/mocks/null_object_mock_spec.rb
View
5 spec/rspec/mocks/null_object_mock_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.