spec/rspec/mocks/any_instance_spec.rb in rspec-mocks-2.99.0.beta1 vs spec/rspec/mocks/any_instance_spec.rb in rspec-mocks-2.99.0.beta2
- old
+ new
@@ -212,9 +212,11 @@
expect { klass.new.existing_method}.to raise_error(CustomErrorForAnyInstanceSpec)
end
end
context "with a block" do
+ before { allow_unavoidable_1_8_deprecation }
+
it "stubs a method" do
klass.any_instance.stub(:foo) { 1 }
expect(klass.new.foo).to eq(1)
end