module HTMLSpecHelper def fake(uri, response, verb = :get) FakeWeb.register_uri(verb, uri, response: header(response)) end def header(html) "HTTP/1.1 200 OK\n\n#{html}" end def onebox_view(html) %|
#{html}
| end def response(file) File.read(File.join("spec", "fixtures", "#{file}.response")) end end