Sha256: 6ea1c0c67566fd986e2a46d5bd93cbc97e2a8ea1209820efb5e394b3312d3026
Contents?: true
Size: 629 Bytes
Versions: 1
Compression:
Stored size: 629 Bytes
Contents
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require "minitest/autorun" require "pry" require "bookscan_client" require "webmock/minitest" WEBMOCK_DATADIR = File.expand_path('../data', __FILE__) WEBMOCK_PAGES = { BookscanClient::URL::MYPAGE => "mypage.html", BookscanClient::URL::OPTIMIZED_BOOKS => "optimized_books.html", } def stub_requests WEBMOCK_PAGES.each do |url, filename| path = File.join(WEBMOCK_DATADIR, filename) WebMock. stub_request(:get, url). to_return(body: File.new(path), status: 200, headers: { 'Content-Type' => 'text/html' }) p "stub #{url}" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bookscan_client-0.0.2 | test/test_helper.rb |