Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
less_accounting / spec / spec_helper.rb
Size: Mime:
require_relative '../lib/less_accounting'
require 'rspec'
require 'webmock/rspec'

RSpec.configure do |config|
  config.include WebMock::API
end

def stub_get(path, key)
  stub_request(:get, domain + path + "?api_key=#{key}")
end

def stub_post(path)
  stub_request(:post, domain + path + "?api_key=#{key}", :content_type => 'application/x-www-form-urlencoded')
end

def stub_put(path)
  stub_request(:put, domain + path + "?_method=put&api_key=#{key}", :content_type => 'application/x-www-form-urlencoded')
end

def stub_delete(path, key)
  stub_request(:delete, domain + path + "?_method=delete&api_key=#{key}")
end

def domain
  return 'https://tester:testing@testdomain.lessaccounting.com/'
end

def set_headers
  {
    'Accept'=>'*/*', 
    'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
    'User-Agent'=>'Faraday v0.9.0'
  }  
end