Sha256: b5e27747d2745064ff2f5bc6119af7f654fbe2d732103373ebc805420f34cf4d

Contents?: true

Size: 278 Bytes

Versions: 1

Compression:

Stored size: 278 Bytes

Contents

module FakeWebHelper
  def fake(uri, file, verb = :get)
    FakeWeb.register_uri(verb, uri, response: response(file))
  end

  def header(html)
    "HTTP/1.1 200 OK\n\n#{html}"
  end

  def response(file)
    html = File.read("spec/fixtures/#{file}")
    header(html)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
picture_from-0.0.1 spec/support/fake_web_helper.rb