aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-17 14:21:09 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-18 21:34:00 -0200
commit4913984122c436a74179e6d0aa4b5ec0ca2ebe59 (patch)
treed4769ea4cfb9841cb2de4e30d78c34fb8577d715 /activesupport/lib
parenta739340d3c9e66814429af6f3f410c01ff86810a (diff)
downloadrails-4913984122c436a74179e6d0aa4b5ec0ca2ebe59.tar.gz
rails-4913984122c436a74179e6d0aa4b5ec0ca2ebe59.tar.bz2
rails-4913984122c436a74179e6d0aa4b5ec0ca2ebe59.zip
Revert "Merge pull request #4575 from carlosantoniodasilva/remove-test-pending"
This reverts commit 1620df78dff527b4fa3f7b204fa05d1b630aae17, reversing changes made to 2d000328dfc0d4b297fb4bdcebc9af6c2fb559dc. Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/test_case.rb
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/test_case.rb2
-rw-r--r--activesupport/lib/active_support/testing/pending.rb20
2 files changed, 22 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb
index c96ad17aba..ee7bda9f93 100644
--- a/activesupport/lib/active_support/test_case.rb
+++ b/activesupport/lib/active_support/test_case.rb
@@ -4,6 +4,7 @@ require 'active_support/testing/tagged_logging'
require 'active_support/testing/setup_and_teardown'
require 'active_support/testing/assertions'
require 'active_support/testing/deprecation'
+require 'active_support/testing/pending'
require 'active_support/testing/isolation'
require 'active_support/testing/constant_lookup'
require 'active_support/core_ext/kernel/reporting'
@@ -40,6 +41,7 @@ module ActiveSupport
include ActiveSupport::Testing::SetupAndTeardown
include ActiveSupport::Testing::Assertions
include ActiveSupport::Testing::Deprecation
+ include ActiveSupport::Testing::Pending
def self.describe(text)
if block_given?
diff --git a/activesupport/lib/active_support/testing/pending.rb b/activesupport/lib/active_support/testing/pending.rb
new file mode 100644
index 0000000000..510f80f32c
--- /dev/null
+++ b/activesupport/lib/active_support/testing/pending.rb
@@ -0,0 +1,20 @@
+# Some code from jeremymcanally's "pending"
+# https://github.com/jeremymcanally/pending/tree/master
+
+module ActiveSupport
+ module Testing
+ module Pending
+
+ unless defined?(Spec)
+
+ @@pending_cases = []
+ @@at_exit = false
+
+ def pending(description = "", &block)
+ skip(description.blank? ? nil : description)
+ end
+ end
+
+ end
+ end
+end