From 4b7f95eb8b45a32c470a414c7f536fb8cb029bda Mon Sep 17 00:00:00 2001 From: Rob Date: Fri, 1 May 2009 23:22:09 +0100 Subject: [PATCH] Fix binary fixture test on Windows [#2597 state:committed] Signed-off-by: Jeremy Kemper --- activerecord/test/cases/fixtures_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index b07d4f3521..eb3f03c91d 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -185,7 +185,7 @@ class FixturesTest < ActiveRecord::TestCase 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