Permalink
Browse files

Add failing spec for #219.

  • Loading branch information...
1 parent bde69f0 commit 06b7763b37f9a4678ca165b41af639ade88fb8f7 @myronmarston myronmarston committed Feb 2, 2013
Showing with 9 additions and 0 deletions.
  1. +9 −0 spec/rspec/mocks/any_instance_spec.rb
@@ -436,6 +436,15 @@ class RSpec::SampleRspecTestClass;end
end
end
+ it 'works with a BasicObject subclass' do
+ klass = Class.new(BasicObject) do
+ def foo; end
+ end
+
+ klass.any_instance.should_receive(:foo)
+ klass.new.foo
+ end
+
context "with argument matching" do
before do
klass.any_instance.should_receive(:foo).with(:param_one, :param_two).and_return(:result_one)

0 comments on commit 06b7763

Please sign in to comment.