Permalink
Browse files

Fix binary fixture test on Windows

[#2597 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent d804153 commit 4b7f95eb8b45a32c470a414c7f536fb8cb029bda @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
@@ -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 4b7f95e

Please sign in to comment.