spec/acceptance/shared/stubbing_requests.rb in webmock-3.0.1 vs spec/acceptance/shared/stubbing_requests.rb in webmock-3.1.0

- old
+ new

@@ -61,9 +61,14 @@ it "should return stubbed response when stub expects only part of query params" do stub_request(:get, "www.example.com").with(query: hash_including({"a" => ["b", "c"]})).to_return(body: "abc") expect(http_request(:get, "http://www.example.com/?a[]=b&a[]=c&b=1").body).to eq("abc") end + + it 'should return stubbed response when stub expects exclude part of query params' do + stub_request(:get, 'www.example.com').with(query: hash_excluding(a: ['b', 'c'])).to_return(body: 'abc') + expect(http_request(:get, 'http://www.example.com/?a[]=c&a[]=d&b=1').body).to eq('abc') + end end describe "based on method" do it "should return stubbed response" do stub_request(:get, "www.example.com")