test/movie_test.rb in imdb_party-0.3.0 vs test/movie_test.rb in imdb_party-0.4.0
- old
+ new
@@ -1,10 +1,10 @@
require 'test_helper'
class MovieTest < Test::Unit::TestCase
context "a movie" do
- setup do
+ setup do
@imdb = ImdbParty::Imdb.new
@movie = @imdb.find_movie_by_id("tt0382932")
end
should "have a title" do
@@ -30,11 +30,11 @@
should "have a rating" do
assert_equal 8.1, @movie.rating
end
should "have a poster_url" do
- assert_equal "http://ia.media-imdb.com/images/M/MV5BMzgwNzY0MDkwOF5BMl5BanBnXkFtZTcwNzMxMDI1MQ@@._V1_.jpg", @movie.poster_url
+ assert_match /http:\/\/ia.media-imdb.com\/images\/.*/, @movie.poster_url
end
should "have a release date" do
assert_equal DateTime.parse("2007-06-29"), @movie.release_date
end
@@ -68,6 +68,6 @@
assert_equal Array, @movie.writers.class
assert_equal 2, @movie.writers.size
end
end
-end
\ No newline at end of file
+end