mirror of
https://github.com/samsonjs/instapaper.git
synced 2026-03-25 08:55:49 +00:00
NOTE: This is undocumented and unconfirmed by Instapaper, but was discovered through trial and error.
34 lines
631 B
Ruby
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
|