Sha256: 5e41296257b865b88f6af9890fb7ef25c7044bb1dbb24019191f33f5bac697dd
Contents?: true
Size: 501 Bytes
Versions: 1
Compression:
Stored size: 501 Bytes
Contents
module IoSpecHelper def webmock(uri, status, content) stub_request(:get, uri). with(:headers => {'Accept'=>'*/*'}).\ to_return(:status => status, :body => content) 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.3.0 | spec/site_checker/io/io_spec_helper.rb |