Sha256: 93f75df97816c3f4a95ed3725bfb02859bb73a9ad8a8bc9520c66ae07adf8251
Contents?: true
Size: 1.11 KB
Versions: 1
Compression:
Stored size: 1.11 KB
Contents
require_relative '../spec_helper' require 'support/vcr' require 'support/fixture_helpers' module Fandango describe TheaterShowtimes do include FixtureHelpers it 'requests and parses showtimes for given URL into Movies with Showtimes' do VCR.use_cassette 'theater_showtimes_amcquailspringsmall24' do url = 'http://www.fandango.com/amcquailspringsmall24_aaktw/theaterpage?wssaffid=11836&wssac=123' movies = Fandango.theater_showtimes(url) fixture_yaml = fixture_file_content('theater_showtimes_amcquailspringsmall24.yml') movies.to_yaml.must_equal fixture_yaml end end it 'requests and parses showtimes for given theater id and date' do VCR.use_cassette 'theater_showtimes_amcquailspringsmall24_tomorrow' do tomorrow = Date.new(2017, 1, 5) movies = Fandango.theater_showtimes( :theater_id => 'aaktw', :date => tomorrow, ) fixture_yaml = fixture_file_content('theater_showtimes_amcquailspringsmall24_tomorrow.yml') movies.to_yaml.must_equal fixture_yaml end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fandango-2.0.0 | spec/api/theater_showtimes.spec.rb |