Permalink
Browse files

add tests

  • Loading branch information...
maddox committed Oct 6, 2009
1 parent a0846c8 commit 4ffff894ca29076937350cfda52875e0c32a15a8
Showing with 14 additions and 2 deletions.
  1. +14 −2 test/trailers_test.rb
View
@@ -2,7 +2,7 @@
class TrailersTest < Test::Unit::TestCase
- context "AppleTrailerSource" do
+ context "SmartTrailerSource" do
context "when searching for a theater movie" do
setup do
@@ -11,7 +11,19 @@ class TrailersTest < Test::Unit::TestCase
end
should "find the movie" do
- assert_equal 'A Nightmare On Elm Street', @trailer.title
+ assert_equal 'A Nightmare On Elm Street', @trailer.name
+ end
+
+ end
+
+ context "when searching for an old movie" do
+ setup do
+ @smart_source = SmartTrailerSource.new
+ @trailer = @smart_source.find_by_name("Die Hard")
+ end
+
+ should "find the movie" do
+ assert_equal 'Die Hard', @trailer.name
end
end

0 comments on commit 4ffff89

Please sign in to comment.