RSpec any_instance deprecation: how to fix it?
In my Rails project I’m using rspec-mocks using any_instance but I want to avoid this deprecation message: Using any_instance from rspec-mocks’ old :should syntax without explicitly enabling the syntax is deprecated. Use the new :expect syntax or explicitly enable :should instead. Here is my specs: describe (“.create”) do it ‘should return error when…’ do User.any_instance.stub(:save).and_return(false) … Read more