diff options
Diffstat (limited to 'activerecord/test/cases/binary_test.rb')
-rw-r--r-- | activerecord/test/cases/binary_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/binary_test.rb b/activerecord/test/cases/binary_test.rb index 2effa5736f..7131532c05 100644 --- a/activerecord/test/cases/binary_test.rb +++ b/activerecord/test/cases/binary_test.rb @@ -17,7 +17,9 @@ unless current_adapter?(:SQLServerAdapter, :SybaseAdapter, :DB2Adapter, :Firebir Binary.delete_all FIXTURES.each do |filename| - data = File.read(ASSETS_ROOT + "/#{filename}").freeze + data = File.read(ASSETS_ROOT + "/#{filename}") + data.force_encoding('ASCII-8BIT') if data.respond_to?(:force_encoding) + data.freeze bin = Binary.new(:data => data) assert_equal data, bin.data, 'Newly assigned data differs from original' |