From 6b0f3cd4f34455f3d44cb0e05249205c5071b756 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Thu, 19 Sep 2019 20:36:33 +0100 Subject: [PATCH] Transpec spec/performance/shop_controller_spec --- spec/performance/shop_controller_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/performance/shop_controller_spec.rb b/spec/performance/shop_controller_spec.rb index 81073104e7..a26aeb48ef 100644 --- a/spec/performance/shop_controller_spec.rb +++ b/spec/performance/shop_controller_spec.rb @@ -6,8 +6,8 @@ describe ShopController, type: :controller, performance: true do let(:order_cycle) { create(:simple_order_cycle, distributors: [d], coordinator_fees: [enterprise_fee]) } before do - controller.stub(:current_distributor) { d } - controller.stub(:current_order_cycle) { order_cycle } + allow(controller).to receive(:current_distributor) { d } + allow(controller).to receive(:current_order_cycle) { order_cycle } Spree::Config.currency = 'AUD' end @@ -36,7 +36,7 @@ describe ShopController, type: :controller, performance: true do it "returns products via json" do results = multi_benchmark(3, cache_key_patterns: cache_key_patterns) do xhr :get, :products - response.should be_success + expect(response).to be_success end end end