instapaper/spec/spec_helper.rb
stve 45c110f96d highlights return successfully with a GET request
NOTE: This is undocumented and unconfirmed by Instapaper, but was
discovered through trial and error.
2015-10-06 10:15:34 -04:00

34 lines
631 B
Ruby

unless ENV['CI']
require 'simplecov'
SimpleCov.start do
add_filter '/spec/'
end
end
require 'instapaper'
require 'rspec'
require 'webmock/rspec'
def a_post(path)
a_request(:post, Instapaper::HTTP::Request::BASE_URL + path)
end
def a_get(path)
a_request(:get, Instapaper::HTTP::Request::BASE_URL + path)
end
def stub_post(path)
stub_request(:post, Instapaper::HTTP::Request::BASE_URL + path)
end
def stub_get(path)
stub_request(:get, Instapaper::HTTP::Request::BASE_URL + path)
end
def fixture_path
File.expand_path('../fixtures', __FILE__)
end
def fixture(file)
File.new(fixture_path + '/' + file)
end