Sha256: 2c445ae4ac2132e67cdd6cf6e65ec62ef6efe903812bf3c45987ed21649b72c0
Contents?: true
Size: 1.55 KB
Versions: 3
Compression:
Stored size: 1.55 KB
Contents
require 'simplecov' require 'coveralls' require 'rspec' require 'webmock/rspec' require 'yotpo' require 'vcr' SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter ] SimpleCov.start VCR.configure do |c| c.hook_into :webmock c.ignore_hosts 'coveralls.io' c.cassette_library_dir = 'spec/cassettes' c.default_cassette_options = { :record => :new_episodes } end RSpec.configure do |config| config.expect_with :rspec do |c| c.syntax = :expect end config.before(:all) do @app_key = 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG' @secret = 'YUFV3FrFHGbAJLPsOR8JebwUUhGJg9Z42XKj3Umm' VCR.use_cassette('get_oauth_token') do @utoken ||= Yotpo.get_oauth_token({ app_key: @app_key, secret: @secret }).body.access_token end end end def a_delete(path) a_request(:delete, 'https://api.yotpo.com' + path) end def a_get(path) a_request(:get, 'https://api.yotpo.com' + path) end def a_post(path) a_request(:post, 'https://api.yotpo.com' + path) end def a_put(path) a_request(:put, 'https://api.yotpo.com' + path) end def stub_delete(path) stub_request(:delete, 'https://api.yotpo.com' + path) end def stub_get(path) stub_request(:get, 'https://api.yotpo.com' + path) end def stub_post(path) stub_request(:post, 'https://api.yotpo.com' + path) end def stub_put(path) stub_request(:put, 'https://api.yotpo.com' + path) end def fixture_path File.expand_path('../fixtures', __FILE__) end def fixture(file) File.new(fixture_path + '/' + file) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
yotpo-0.0.8 | spec/helper.rb |
yotpo-0.0.7 | spec/helper.rb |
yotpo-0.0.6 | spec/helper.rb |