Skip to content

Commit 89c461d

Browse files
committed
remove deprecation warning from spec
1 parent 947a171 commit 89c461d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec/rspec/active_model/mocks/mock_model_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,13 @@
298298
end
299299

300300
context "with as_null_object" do
301+
around do |example|
302+
original = RSpec::Mocks.configuration.syntax
303+
RSpec::Mocks.configuration.syntax = :should
304+
example.run
305+
RSpec::Mocks.configuration.syntax = original
306+
end
307+
301308
it "says it will not respond_to?(xxx_before_type_cast)" do
302309
model = NonActiveRecordModel.new.as_null_object
303310
expect(model.respond_to?("title_before_type_cast")).to be(false)

0 commit comments

Comments
 (0)