Permalink
Browse files

Merge pull request #2374 from arunagw/30_schema_dumper_test_fix

3-0-stable schema dumper test fix
  • Loading branch information...
2 parents 553d9ea + b0334db commit cb36585c27e77073c1bd6702cd828f1bf1d2ee35 @spastorino spastorino committed Jul 31, 2011
Showing with 5 additions and 4 deletions.
  1. +5 −4 activerecord/test/cases/schema_dumper_test.rb
@@ -1,5 +1,5 @@
require "cases/helper"
-require 'stringio'
+require 'active_support/core_ext/string/encoding'
class SchemaDumperTest < ActiveRecord::TestCase
@@ -14,9 +14,10 @@ def standard_dump
@stream.string
end
- def test_magic_comment
- skip "only test magic comments on 1.9" if RUBY_VERSION < '1.9'
- assert_match "# encoding: #{@stream.external_encoding.name}", standard_dump
+ if "string".encoding_aware?
+ def test_magic_comment
+ assert_match "# encoding: #{@stream.external_encoding.name}", standard_dump
+ end
end
def test_schema_dump

0 comments on commit cb36585

Please sign in to comment.