Browse files

Fix binary fixture test on Windows

[#2597 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent ac9f9a9 commit a25296ab0543f60944a1d6c36314758c5bc02483 @rob-at-thewebfellas rob-at-thewebfellas committed with jeremy May 1, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/fixtures_test.rb
View
2 activerecord/test/cases/fixtures_test.rb
@@ -185,7 +185,7 @@ def test_subsubdir_file_with_arbitrary_name
def test_binary_in_fixtures
assert_equal 1, @binaries.size
- data = File.read(ASSETS_ROOT + "/flowers.jpg")
+ data = File.open(ASSETS_ROOT + "/flowers.jpg", 'rb') { |f| f.read }
data.force_encoding('ASCII-8BIT') if data.respond_to?(:force_encoding)
data.freeze
assert_equal data, @flowers.data

0 comments on commit a25296a

Please sign in to comment.