From 256d3871597079a274aa9685b66e34307ff479b1 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 31 Dec 2004 16:42:25 +0000 Subject: Fixed quoting in validates_format_of that would allow some rules to pass regardless of input #390 [Dmitry V. Sabanin] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@288 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/validations_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/validations_test.rb') diff --git a/activerecord/test/validations_test.rb b/activerecord/test/validations_test.rb index db6aab653b..ed9d76bd3e 100755 --- a/activerecord/test/validations_test.rb +++ b/activerecord/test/validations_test.rb @@ -224,7 +224,7 @@ class ValidationsTest < Test::Unit::TestCase end def test_validate_format - Topic.validates_format_of(:title, :content, :with => /^Validation macros rule!$/, :message => "is bad data") + Topic.validates_format_of(:title, :content, :with => /^Validation\smacros \w+!$/, :message => "is bad data") t = Topic.create("title" => "i'm incorrect", "content" => "Validation macros rule!") assert !t.valid?, "Shouldn't be valid" -- cgit v1.2.3