diff --git a/spec/rspec/rspec_spec.rb b/spec/rspec/rspec_spec.rb index 9c0d87db..506d53a4 100644 --- a/spec/rspec/rspec_spec.rb +++ b/spec/rspec/rspec_spec.rb @@ -124,4 +124,11 @@ def subdomain expect(response).to have_http_status(:ok) end + + it "allows to stub app calls" do + allow_any_instance_of(RageController::API).to receive(:params).and_return({ i: "12345" }) + + get "/params?i=111" + expect(response.body).to eq("12345") + end end