class SterlingApi::RemoteActions::MockResponse

for use in tests

options:

:ret_val    the Net::HTTP return value
            pass true for Net::HTTPSuccess, Net::HTTPRedirection
            pass false for all others

:body       the body 'returned' by the supposed Net::HTTP request

Public Class Methods

new(options={}) click to toggle source
# File lib/sterling_api/remote_actions.rb, line 47
def initialize(options={})
  Struct.new('MockHttpResponse', :body) unless defined?(Struct::MockHttpResponse)
  mock_http_response = Struct::MockHttpResponse.new(options[:body])
  super(options[:ret_val], mock_http_response)
end