lib/spree/api/testing_support/setup.rb in spree_api-2.3.4 vs lib/spree/api/testing_support/setup.rb in spree_api-2.3.5

- old
+ new

@@ -3,11 +3,11 @@ module TestingSupport module Setup def sign_in_as_admin! let!(:current_api_user) do user = stub_model(Spree::LegacyUser) - user.stub_chain(:spree_roles, :pluck).and_return(["admin"]) - user.stub(:has_spree_role?).with("admin").and_return(true) + allow(user).to receive_message_chain(:spree_roles, :pluck).and_return(["admin"]) + allow(user).to receive(:has_spree_role?).with("admin").and_return(true) user end end end end