Sha256: f822502577c1bdfd730b2a731358c6d3d5cfcbb94069154180051b093c1e80e9
Contents?: true
Size: 918 Bytes
Versions: 7
Compression:
Stored size: 918 Bytes
Contents
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'webmock' require 'agra_api' # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} RSpec.configure do |config| config.include WebMock::API config.before(:each) do WebMock.reset! end config.after(:each) do WebMock.reset! end end def stub_get(path) stub_agra_request(:get, path) end def stub_post(path) stub_agra_request(:post, path) end def stub_agra_request(method, path) prefix = AgraApi.new.connection.configuration.prefix.to_s stub_request(method, "https://test.com" + prefix + path) end def fixture_path File.expand_path("../fixtures", __FILE__) end def fixture(file) File.new(File.join(fixture_path, '/', file)) end
Version data entries
7 entries across 7 versions & 1 rubygems