spec/fandango.spec.rb in fandango-0.2.0 vs spec/fandango.spec.rb in fandango-0.2.1
- old
+ new
@@ -28,8 +28,16 @@
it 'raises BadResponse unless feedzirra feed responds to entries' do
Feedzirra::Feed.expects(:fetch_and_parse).returns(0)
proc { Fandango.movies_near(123) }.must_raise(Fandango::BadResponse)
end
+ it 'removes spaces from postal code' do
+ feed = Object.new
+ feed.stubs(:entries).returns([])
+ url = 'http://www.fandango.com/rss/moviesnearme_ABC123.rss'
+ Feedzirra::Feed.expects(:fetch_and_parse).with(url).returns(feed)
+ Fandango.send(:fetch_and_parse, 'ABC 123')
+ end
+
end
end