require 'minitest/spec' require 'minitest/mock' require 'minitest/autorun' require 'webmock/minitest' require 'crp' FIXTURES_PATH = File.expand_path("#{File.dirname(__FILE__)}/fixtures") def valid_review_body @valid_review_body ||= File.read(File.join(FIXTURES_PATH, 'valid_review.json')) end def valid_review_body_with_integer_internal_id @valid_review_body_with_integer_internal_id ||= File.read(File.join(FIXTURES_PATH, 'valid_review_with_integer_internal_id.json')) end def valid_callback_review_body @valid_callback_review_body ||= File.read(File.join(FIXTURES_PATH, 'valid_callback_review.txt')).chomp end def stub_new_review_request(new_review_url) request = { :headers => {'Accept' => '*/*', 'User-Agent' => 'Ruby'} } response = { :status => 200, :body => {}, :headers => {} } stub_request(:get, new_review_url).with(request).to_return(response) end