Sha256: 26acc231ff0f85e18033a8b815a41ed280d20876cf98d694244e4a779f174b27

Contents?: true

Size: 692 Bytes

Versions: 105

Compression:

Stored size: 692 Bytes

Contents

shared_context "precedence of stubs" do |*adapter_info|
  describe "when choosing a matching request stub" do
    it "should use the last declared matching request stub" do
      stub_request(:get, "www.example.com").to_return(body: "abc")
      stub_request(:get, "www.example.com").to_return(body: "def")
      expect(http_request(:get, "http://www.example.com/").body).to eq("def")
    end

    it "should not be affected by the type of uri or request method" do
      stub_request(:get, "www.example.com").to_return(body: "abc")
      stub_request(:any, /.*example.*/).to_return(body: "def")
      expect(http_request(:get, "http://www.example.com/").body).to eq("def")
    end
  end
end

Version data entries

105 entries across 99 versions & 8 rubygems

Version Path
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/webmock-3.18.1/spec/acceptance/shared/precedence_of_stubs.rb
webmock-3.18.1 spec/acceptance/shared/precedence_of_stubs.rb
webmock-3.18.0 spec/acceptance/shared/precedence_of_stubs.rb
webmock-3.15.2 spec/acceptance/shared/precedence_of_stubs.rb
webmock-3.16.2 spec/acceptance/shared/precedence_of_stubs.rb
webmock-3.16.1 spec/acceptance/shared/precedence_of_stubs.rb
webmock-3.15.1 spec/acceptance/shared/precedence_of_stubs.rb
webmock-3.17.1 spec/acceptance/shared/precedence_of_stubs.rb
webmock-3.17.0 spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/acceptance/shared/precedence_of_stubs.rb
webmock-3.14.0 spec/acceptance/shared/precedence_of_stubs.rb