From 5bf3d46becdec8705681b8914376a26a6c759dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Mon, 11 Apr 2011 17:41:33 +0200 Subject: Revert "Add :use_include option to allow user to explicitly use `Range#include?` method in Ruby 1.9" Use :with => range.to_a instead. This reverts commit f6540211b5b9133c9f93c11655a04d613c237e67. --- .../test/cases/validations/exclusion_validation_test.rb | 10 ---------- .../test/cases/validations/inclusion_validation_test.rb | 9 --------- 2 files changed, 19 deletions(-) (limited to 'activemodel/test') diff --git a/activemodel/test/cases/validations/exclusion_validation_test.rb b/activemodel/test/cases/validations/exclusion_validation_test.rb index e1807a3f34..fe0d13ec33 100644 --- a/activemodel/test/cases/validations/exclusion_validation_test.rb +++ b/activemodel/test/cases/validations/exclusion_validation_test.rb @@ -63,14 +63,4 @@ class ExclusionValidationTest < ActiveModel::TestCase p.author_name = "sikachu" assert_raise(ArgumentError){ p.valid? } end - - def test_validates_inclusion_with_explicit_include - range = (1..100) - Topic.validates_exclusion_of :title, :in => range, :use_include => true - range.expects(:include?).returns(false) - - t = Topic.new - t.title = 102 - assert t.valid? - end end diff --git a/activemodel/test/cases/validations/inclusion_validation_test.rb b/activemodel/test/cases/validations/inclusion_validation_test.rb index d183b42c2b..e6adb6d187 100644 --- a/activemodel/test/cases/validations/inclusion_validation_test.rb +++ b/activemodel/test/cases/validations/inclusion_validation_test.rb @@ -95,13 +95,4 @@ class InclusionValidationTest < ActiveModel::TestCase p.author_name = "sikachu" assert_raise(ArgumentError){ p.valid? } end - - def test_validates_inclusion_with_explicit_include - range = (1..100) - Topic.validates_inclusion_of :title, :in => range, :use_include => true - - t = Topic.new - t.title = 42 - assert t.valid? - end end -- cgit v1.2.3