Last active
May 19, 2016 05:27
-
-
Save BradleyJohnson/fa21cb145996bbeb70adaf44650ff464 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) | |
require 'the_geek' | |
require 'webmock/rspec' | |
WebMock.disable_net_connect!(allow_localhost: true) | |
RSpec.configure do |config| | |
config.before(:each) do | |
stub_request(:get, /www.boardgamegeek.com/). | |
with(headers: {'Accept'=>'*/*', 'User-Agent'=>'Ruby'}). | |
to_return(status: 200, body: "stubbed response", headers: {}) | |
stub_request(:get, /www.boardgamegeek.com/). | |
with(headers: {'Accept'=>'*/*', 'User-Agent'=>'SOME 404 STRING'}). | |
to_return(status: 404, body: "Not Found", headers: {}) | |
stub_request(:get, /www.boardgamegeek.com/). | |
with(headers: {'Accept'=>'*/*', 'User-Agent'=>'SOME 503 STRING'}). | |
to_return(status: 503, body: "Not Found", headers: {}) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment