Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maddox committed Oct 6, 2009
1 parent a0846c8 commit 4ffff89
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/trailers_test.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4ffff89

Please sign in to comment.