From c3c1311e2f41b7f539a510ef88a1ceb420d2966b Mon Sep 17 00:00:00 2001 From: Luis Castro Date: Sat, 13 Jul 2019 10:53:47 +0200 Subject: [PATCH] test(shared_user_context): move to ActionDistpach From ActionController::TestResponse, to use the new IntegrationTest from rails 5. --- spec/controllers/support/shared_user_context.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/support/shared_user_context.rb b/spec/controllers/support/shared_user_context.rb index 7517f4a1..d36579c1 100644 --- a/spec/controllers/support/shared_user_context.rb +++ b/spec/controllers/support/shared_user_context.rb @@ -93,7 +93,7 @@ RSpec.shared_context :shared_user_context do sign_in user_to_signin if user_to_signin # allows us to run the helpers but ignore what the controller action does # - expect_any_instance_of(described_class).to receive(action).and_return(ActionController::TestResponse.new(200)) + expect_any_instance_of(described_class).to receive(action).and_return(ActionDispatch::IntegrationTest.new(200)) expect_any_instance_of(described_class).to receive(:render).and_return(nil) send(method, action, *args) expect(response.status).to eq 200 @@ -596,4 +596,4 @@ RSpec.shared_context :open_to_profile_owner do |method, action, *args| it 'accepts profile user' do accept(user_with_profile, method, action, *fixed_args) end -end \ No newline at end of file +end