From 47f64387b4562c24681a2ce827f47c2f321d8188 Mon Sep 17 00:00:00 2001 From: Roman Samoilov <2270393+rsamoilov@users.noreply.github.com> Date: Mon, 19 Feb 2024 11:02:30 +0000 Subject: [PATCH] Add tests --- spec/rspec/rspec_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) 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