Sha256: da73901a6540e0955d42448eaafa8f573de1536503458d286552b6b23a99c4fa
Contents?: true
Size: 531 Bytes
Versions: 3
Compression:
Stored size: 531 Bytes
Contents
module WebMock class RequestStub attr_accessor :request_profile, :response def initialize(method, uri) @request_profile = RequestProfile.new(method, uri) @response = WebMock::Response.new self end def with(params) @request_profile.with(params) self end def to_return(response_hash) @response = WebMock::Response.new(response_hash) end def to_raise(exception) @response = WebMock::Response.new({:exception => exception}) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
webmock-0.8.2 | lib/webmock/request_stub.rb |
webmock-0.8.1 | lib/webmock/request_stub.rb |
webmock-0.8.0 | lib/webmock/request_stub.rb |