Permalink
Browse files

Small tweaks so we aren't trying to write blank file.

  • Loading branch information...
1 parent 28d3883 commit a61510e0bbca3a05fe818062334191ab39e463e3 @jnunemaker jnunemaker committed Apr 5, 2010
Showing with 4 additions and 9 deletions.
  1. +4 −9 test/test_joint.rb
View
@@ -241,16 +241,11 @@ def teardown
end
should "use original_filename if available" do
- begin
- file = Tempfile.new('testing.txt')
- def file.original_filename
- 'testing.txt'
- end
- doc = Asset.create(:image => file)
- assert_equal 'testing.txt', doc.image_name
- ensure
- file.close
+ def @image.original_filename
+ 'testing.txt'
end
+ doc = Asset.create(:image => @image)
+ assert_equal 'testing.txt', doc.image_name
end
end
end

0 comments on commit a61510e

Please sign in to comment.