aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRob <rob.anderton@thewebfellas.com>2009-05-01 23:22:09 +0100
committerJeremy Kemper <jeremy@bitsweat.net>2009-08-08 19:18:38 -0700
commit4b7f95eb8b45a32c470a414c7f536fb8cb029bda (patch)
tree5bacd20472a37962d6397f5b8724f2bbfe12b57e /activerecord/test
parentd8041538dd1fed038c1ad30ddca5c9ce8254ee30 (diff)
downloadrails-4b7f95eb8b45a32c470a414c7f536fb8cb029bda.tar.gz
rails-4b7f95eb8b45a32c470a414c7f536fb8cb029bda.tar.bz2
rails-4b7f95eb8b45a32c470a414c7f536fb8cb029bda.zip
Fix binary fixture test on Windows
[#2597 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/fixtures_test.rb2
1 files changed, 1 insertions, 1 deletions
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