aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/CHANGELOG.md2
-rw-r--r--activesupport/lib/active_support/testing/pending.rb10
-rw-r--r--activesupport/test/test_case_test.rb6
3 files changed, 10 insertions, 8 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index fe1ffc82e5..504ebcb2fe 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,5 +1,7 @@
## Rails 4.0.0 (unreleased) ##
+* Deprecate `ActiveSupport::TestCase#pending` method, use `skip` from MiniTest instead. *Carlos Antonio da Silva*
+
* `XmlMini.with_backend` now may be safely used with threads:
Thread.new do
diff --git a/activesupport/lib/active_support/testing/pending.rb b/activesupport/lib/active_support/testing/pending.rb
index 510f80f32c..944806bb64 100644
--- a/activesupport/lib/active_support/testing/pending.rb
+++ b/activesupport/lib/active_support/testing/pending.rb
@@ -1,20 +1,14 @@
-# Some code from jeremymcanally's "pending"
-# https://github.com/jeremymcanally/pending/tree/master
+require 'active_support/deprecation'
module ActiveSupport
module Testing
module Pending
-
unless defined?(Spec)
-
- @@pending_cases = []
- @@at_exit = false
-
def pending(description = "", &block)
+ ActiveSupport::Deprecation.warn("#pending is deprecated and will be removed in Rails 4.1, please use #skip instead.")
skip(description.blank? ? nil : description)
end
end
-
end
end
end
diff --git a/activesupport/test/test_case_test.rb b/activesupport/test/test_case_test.rb
index 64426d02e9..dfe9f3c11c 100644
--- a/activesupport/test/test_case_test.rb
+++ b/activesupport/test/test_case_test.rb
@@ -108,5 +108,11 @@ module ActiveSupport
test = tc.new test_name
assert_raises(Interrupt) { test.run fr }
end
+
+ def test_pending_deprecation
+ assert_deprecated do
+ pending "should use #skip instead"
+ end
+ end
end
end