test/drop_test.rb in gasoline-0.0.1 vs test/drop_test.rb in gasoline-0.0.2
- old
+ new
@@ -53,9 +53,14 @@
it "should set header with description" do
assert_match "zyx", @drop.description
end
+ it "should return nil if there was any error fetching it" do
+ @drop.stubs(:download_content).raises(StandardError, 'some error probably 404')
+ assert_nil @drop.patch
+ end
+
it "should try to download when asked for patch" do
@drop.expects(:download_content).returns("ZE JS CONTENT")
assert_match "ZE JS", @drop.patch
end
end