Sha256: 2c373800d5cdb2bd9feea6402f5599b9627ae77ae83cab768a51df938bc9b2d4
Contents?: true
Size: 578 Bytes
Versions: 1
Compression:
Stored size: 578 Bytes
Contents
module IoSpecHelper def webmock(uri, status, content, headers = {"Content-Type"=>"text/html; charset=UTF-8"}) stub_request(:get, uri). with(:headers => {'Accept'=>'*/*'}).\ to_return(:status => status, :body => content, :headers => headers) end def filesystemmock(uri, content) FileUtils.mkdir_p(File.dirname(File.join(fs_test_path, uri))) File.open(File.join(fs_test_path, uri), "w") do |f| f.write(content) end end def clean_fs_test_path FileUtils.rm_rf(fs_test_path) end def fs_test_path "test_data_public" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
site_checker-0.4.0 | spec/site_checker/io/io_spec_helper.rb |