Sha256: a18bc5cc9ed79a5793b6ad176e81f4bbb4bfb35f3426af56c539c1bc0fc185ec
Contents?: true
Size: 611 Bytes
Versions: 4
Compression:
Stored size: 611 Bytes
Contents
module Helpers def stub_http(options = {}) response = options[:response] || Net::HTTPSuccess.new('1.2', '200', 'OK') response.stub(:body => options[:body] || '{"id":"1234"}') http = double( :post => response, :read_timeout= => nil, :open_timeout= => nil, :ca_file= => nil, :verify_mode= => nil, :use_ssl= => nil ) Net::HTTP.stub(:new).and_return(http) http end def reset_config Lens.configuration = nil Lens.configure do |config| config.app_key = 'app_key_123' config.secret = 'abc123' end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
lens-0.0.6 | spec/support/helpers.rb |
lens-0.0.5 | spec/support/helpers.rb |
lens-0.0.4 | spec/support/helpers.rb |
lens-0.0.3 | spec/support/helpers.rb |