Sha256: 782f2156349514005c7f6c7d5e787f3c5fc7f3bf7c974d868d640d9020530d92
Contents?: true
Size: 595 Bytes
Versions: 6
Compression:
Stored size: 595 Bytes
Contents
module WebsiteFixturesHelper private def cinema_html(id) read_fixture("html/cinema/#{id}") end def showtimes_html(id, i = nil) read_fixture("html/showtimes/#{id}#{ "-#{i}" if i }") end def sitemap_html read_fixture('html/sitemap') end def read_fixture(filepath) File.read(File.expand_path("../../fixtures/#{filepath}.html", __FILE__)) end def stub_get(site_path, response_body) url = "http://www.odeon.co.uk/#{site_path}" response = { status: 200, body: response_body, headers: {} } stub_request(:get, url).to_return(response) end end
Version data entries
6 entries across 6 versions & 1 rubygems