From e5cc892ce66968d4e15ea3fbf62a9fdd43b410d9 Mon Sep 17 00:00:00 2001 From: Kuldeep Aggarwal Date: Tue, 10 Jun 2014 12:27:17 +0530 Subject: remove depricated Validatior#setup --- activemodel/test/cases/validations_test.rb | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'activemodel/test/cases') diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index 6a74ee353d..4fee704ef5 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -378,25 +378,4 @@ class ValidationsTest < ActiveModel::TestCase assert topic.invalid? assert duped.valid? end - - # validator test: - def test_setup_is_deprecated_but_still_receives_klass # TODO: remove me in 4.2. - validator_class = Class.new(ActiveModel::Validator) do - def setup(klass) - @old_klass = klass - end - - def validate(*) - @old_klass == Topic or raise "#setup didn't work" - end - end - - assert_deprecated do - Topic.validates_with validator_class - end - - t = Topic.new - t.valid? - end - end -- cgit v1.2.3