diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-05-07 20:16:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-07 20:16:42 +0200 |
commit | 45095a817b29f3b4956abce5d059410d591b902a (patch) | |
tree | 5bf7fc2271ddc5d4ed511db35893c2049142831b /activerecord/test/cases/adapters/mysql2 | |
parent | af58740b8d943f90a18c3e7ceca9432775cfe192 (diff) | |
parent | b201474756a2ee493406ad0cb49f49c6873bdc28 (diff) | |
download | rails-45095a817b29f3b4956abce5d059410d591b902a.tar.gz rails-45095a817b29f3b4956abce5d059410d591b902a.tar.bz2 rails-45095a817b29f3b4956abce5d059410d591b902a.zip |
Merge pull request #29005 from kamipo/should_escape_meta_chars_in_regexp
Should escape meta characters in regexp
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/charset_collation_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/charset_collation_test.rb b/activerecord/test/cases/adapters/mysql2/charset_collation_test.rb index 8826ad7fd1..e4a6ed5482 100644 --- a/activerecord/test/cases/adapters/mysql2/charset_collation_test.rb +++ b/activerecord/test/cases/adapters/mysql2/charset_collation_test.rb @@ -48,7 +48,7 @@ class Mysql2CharsetCollationTest < ActiveRecord::Mysql2TestCase test "schema dump includes collation" do output = dump_table_schema("charset_collations") - assert_match %r{t.string\s+"string_ascii_bin",\s+collation: "ascii_bin"$}, output - assert_match %r{t.text\s+"text_ucs2_unicode_ci",\s+collation: "ucs2_unicode_ci"$}, output + assert_match %r{t\.string\s+"string_ascii_bin",\s+collation: "ascii_bin"$}, output + assert_match %r{t\.text\s+"text_ucs2_unicode_ci",\s+collation: "ucs2_unicode_ci"$}, output end end diff --git a/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb b/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb index a0823be143..71dcfaa241 100644 --- a/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb +++ b/activerecord/test/cases/adapters/mysql2/unsigned_type_test.rb @@ -58,9 +58,9 @@ class Mysql2UnsignedTypeTest < ActiveRecord::Mysql2TestCase test "schema dump includes unsigned option" do schema = dump_table_schema "unsigned_types" - assert_match %r{t.integer\s+"unsigned_integer",\s+unsigned: true$}, schema - assert_match %r{t.bigint\s+"unsigned_bigint",\s+unsigned: true$}, schema - assert_match %r{t.float\s+"unsigned_float",\s+limit: 24,\s+unsigned: true$}, schema - assert_match %r{t.decimal\s+"unsigned_decimal",\s+precision: 10,\s+scale: 2,\s+unsigned: true$}, schema + assert_match %r{t\.integer\s+"unsigned_integer",\s+unsigned: true$}, schema + assert_match %r{t\.bigint\s+"unsigned_bigint",\s+unsigned: true$}, schema + assert_match %r{t\.float\s+"unsigned_float",\s+limit: 24,\s+unsigned: true$}, schema + assert_match %r{t\.decimal\s+"unsigned_decimal",\s+precision: 10,\s+scale: 2,\s+unsigned: true$}, schema end end |