mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix binary fixture test on Windows
[#2597 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
parent
d8041538dd
commit
4b7f95eb8b
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue