Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only run binary type cast test with encode! on Ruby 1.9

  • Loading branch information...
commit 24e074fde89e65f20e430f432798fe35dac60d7f 1 parent b1358c8
@carlosantoniodasilva carlosantoniodasilva authored drogus committed
Showing with 8 additions and 6 deletions.
  1. +8 −6 activerecord/test/cases/adapters/sqlite3/quoting_test.rb
View
14 activerecord/test/cases/adapters/sqlite3/quoting_test.rb
@@ -13,12 +13,14 @@ def setup
:timeout => 100
end
- def test_type_cast_binary_encoding_without_logger
- @conn.extend(Module.new { def logger; end })
- column = Struct.new(:type, :name).new(:string, "foo")
- binary = SecureRandom.hex
- expected = binary.dup.encode!('utf-8')
- assert_equal expected, @conn.type_cast(binary, column)
+ if "<3".encoding_aware?
+ def test_type_cast_binary_encoding_without_logger
+ @conn.extend(Module.new { def logger; end })
+ column = Struct.new(:type, :name).new(:string, "foo")
+ binary = SecureRandom.hex
+ expected = binary.dup.encode!('utf-8')
+ assert_equal expected, @conn.type_cast(binary, column)
+ end
end
def test_type_cast_symbol
Please sign in to comment.
Something went wrong with that request. Please try again.