diff options
Diffstat (limited to 'activemodel/test')
3 files changed, 0 insertions, 34 deletions
diff --git a/activemodel/test/cases/validations/exclusion_validation_test.rb b/activemodel/test/cases/validations/exclusion_validation_test.rb index fe0d13ec33..72a383f128 100644 --- a/activemodel/test/cases/validations/exclusion_validation_test.rb +++ b/activemodel/test/cases/validations/exclusion_validation_test.rb @@ -54,13 +54,4 @@ class ExclusionValidationTest < ActiveModel::TestCase p.title = "wasabi" assert p.valid? end - - def test_validates_exclustion_with_invalid_lambda_return - Topic.validates_exclusion_of :title, :in => lambda{ |topic| false } - - p = Topic.new - p.title = "wasabi" - p.author_name = "sikachu" - assert_raise(ArgumentError){ p.valid? } - end end diff --git a/activemodel/test/cases/validations/format_validation_test.rb b/activemodel/test/cases/validations/format_validation_test.rb index 1ff29134ee..73647efea5 100644 --- a/activemodel/test/cases/validations/format_validation_test.rb +++ b/activemodel/test/cases/validations/format_validation_test.rb @@ -122,22 +122,6 @@ class PresenceValidationTest < ActiveModel::TestCase assert p.valid? end - def test_validates_format_of_with_lambda_not_returns_regexp - Topic.validates_format_of :content, :with => lambda{ |topic| false } - - p = Topic.new - p.content = "Pixies" - assert_raise(ArgumentError){ p.valid? } - end - - def test_validates_format_of_without_lambda_not_returns_regexp - Topic.validates_format_of :content, :without => lambda{ |topic| false } - - p = Topic.new - p.content = "Pixies" - assert_raise(ArgumentError){ p.valid? } - end - def test_validates_format_of_for_ruby_class Person.validates_format_of :karma, :with => /\A\d+\Z/ diff --git a/activemodel/test/cases/validations/inclusion_validation_test.rb b/activemodel/test/cases/validations/inclusion_validation_test.rb index e6adb6d187..92c473de0e 100644 --- a/activemodel/test/cases/validations/inclusion_validation_test.rb +++ b/activemodel/test/cases/validations/inclusion_validation_test.rb @@ -86,13 +86,4 @@ class InclusionValidationTest < ActiveModel::TestCase p.title = "elephant" assert p.valid? end - - def test_validates_inclustion_with_invalid_lambda_return - Topic.validates_inclusion_of :title, :in => lambda{ |topic| false } - - p = Topic.new - p.title = "monkey" - p.author_name = "sikachu" - assert_raise(ArgumentError){ p.valid? } - end end |