Sha256: 15eda81110b8689a98cd2f0c6c317f7780d221d25962593a3d6f5ffebfdd5fda
Contents?: true
Size: 779 Bytes
Versions: 2
Compression:
Stored size: 779 Bytes
Contents
require_relative '../spec_helper' require 'support/vcr' require 'support/fixture_helpers' module Fandango describe MoviesNear do include FixtureHelpers it 'returns Theaters and Movies playing at each' do VCR.use_cassette 'movies_near_me_73142' do result = Fandango.movies_near(73142) fixture_yaml = fixture_file_content('movies_near_me_73142.yml') result.to_yaml.must_equal fixture_yaml end end it 'raises error if status code is not 200' do response = MiniTest::Mock.new response.expect(:status, ['500', 'not ok']) MoviesNear.stub(:request, response) do proc do Fandango.movies_near('_') end.must_raise(MoviesNear::BadResponse) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fandango-2.1.0 | spec/api/movies_near.spec.rb |
fandango-2.0.0 | spec/api/movies_near.spec.rb |