Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 864d755177d6cb9c46a64c6d55e7c48122f1d453 1 parent f6d478a
@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.