aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-04-24 21:22:12 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-04-24 21:22:12 +0900
commit0d17168289a0ce7d6972b10fb3f979363b712338 (patch)
treebd96409c9384fd42f1e8d06b1535f2346b9ea775 /activemodel
parentc7f12f152918acf03bbc9788d464981816e61966 (diff)
downloadrails-0d17168289a0ce7d6972b10fb3f979363b712338.tar.gz
rails-0d17168289a0ce7d6972b10fb3f979363b712338.tar.bz2
rails-0d17168289a0ce7d6972b10fb3f979363b712338.zip
Replace \Z to \z
\Z was a mistake of \z. Replace \Z to \z to prevent newly \Z added.
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/test/cases/validations/format_validation_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/test/cases/validations/format_validation_test.rb b/activemodel/test/cases/validations/format_validation_test.rb
index d7e6bf3707..f5b1ad721c 100644
--- a/activemodel/test/cases/validations/format_validation_test.rb
+++ b/activemodel/test/cases/validations/format_validation_test.rb
@@ -107,7 +107,7 @@ class PresenceValidationTest < ActiveModel::TestCase
end
def test_validates_format_of_with_lambda
- Topic.validates_format_of :content, with: lambda { |topic| topic.title == "digit" ? /\A\d+\Z/ : /\A\S+\Z/ }
+ Topic.validates_format_of :content, with: lambda { |topic| topic.title == "digit" ? /\A\d+\z/ : /\A\S+\z/ }
t = Topic.new
t.title = "digit"
@@ -119,7 +119,7 @@ class PresenceValidationTest < ActiveModel::TestCase
end
def test_validates_format_of_without_lambda
- Topic.validates_format_of :content, without: lambda { |topic| topic.title == "characters" ? /\A\d+\Z/ : /\A\S+\Z/ }
+ Topic.validates_format_of :content, without: lambda { |topic| topic.title == "characters" ? /\A\d+\z/ : /\A\S+\z/ }
t = Topic.new
t.title = "characters"
@@ -131,7 +131,7 @@ class PresenceValidationTest < ActiveModel::TestCase
end
def test_validates_format_of_for_ruby_class
- Person.validates_format_of :karma, with: /\A\d+\Z/
+ Person.validates_format_of :karma, with: /\A\d+\z/
p = Person.new
p.karma = "Pixies"