Sha256: f34348241bc401118a0a6979bd7831dce37007eb77b7a6861d35590a596f3c09
Contents?: true
Size: 690 Bytes
Versions: 4
Compression:
Stored size: 690 Bytes
Contents
require 'yasf' def read_fixture(path) File.read(File.expand_path(File.join(File.dirname(__FILE__), "fixtures", path))) end FAKE_URLS = { "http://www.fakeurl.com/basic_example" => "basic_example_response", "http://www.fakeurl.com/medium_example" => "medium_example_response", "http://www.fakeurl.com/advanced_example" => "advanced_example_response", "http://thepiratebay.se/browse/101" => "thepiratebay_response.html" } begin require 'fakeweb' FakeWeb.allow_net_connect = false FAKE_URLS.each do |url, response| FakeWeb.register_uri(:get, url, :body => read_fixture(response)) end rescue LoadError puts "Could not load FakeWeb. Please run 'bundle install'" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
yasf-0.0.6 | spec/spec_helper.rb |
yasf-0.0.5 | spec/spec_helper.rb |
yasf-0.0.4 | spec/spec_helper.rb |
yasf-0.0.3 | spec/spec_helper.rb |