aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/CHANGELOG5
-rw-r--r--activesupport/lib/active_support.rb2
-rw-r--r--activesupport/lib/active_support/test_case.rb5
-rw-r--r--activesupport/lib/active_support/testing.rb1
-rw-r--r--activesupport/lib/active_support/testing/default.rb11
5 files changed, 24 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG
index a513cd570b..3b05196e68 100644
--- a/activesupport/CHANGELOG
+++ b/activesupport/CHANGELOG
@@ -1,5 +1,10 @@
*SVN*
+* Introduce a base class for all test cases used by rails applications. ActiveSupport::TestCase [Koz]
+
+ The intention is to use this to reduce the amount of monkeypatching / overriding that
+ is done to test/unit's classes.
+
* Document Enumerable and Hash #to_json. #9970 [Chu Yeow]
* Hash#to_xml handles symbol values. #9954 [Assaf]
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb
index e33f6ceb27..0b3816ec01 100644
--- a/activesupport/lib/active_support.rb
+++ b/activesupport/lib/active_support.rb
@@ -45,3 +45,5 @@ require 'active_support/json'
require 'active_support/multibyte'
+require 'active_support/testing'
+
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb
new file mode 100644
index 0000000000..be8f8b17fc
--- /dev/null
+++ b/activesupport/lib/active_support/test_case.rb
@@ -0,0 +1,5 @@
+module ActiveSupport
+ class TestCase < Test::Unit::TestCase
+ include ActiveSupport::Testing::Default
+ end
+end \ No newline at end of file
diff --git a/activesupport/lib/active_support/testing.rb b/activesupport/lib/active_support/testing.rb
new file mode 100644
index 0000000000..1bf30cbbdd
--- /dev/null
+++ b/activesupport/lib/active_support/testing.rb
@@ -0,0 +1 @@
+require 'active_support/testing/default' \ No newline at end of file
diff --git a/activesupport/lib/active_support/testing/default.rb b/activesupport/lib/active_support/testing/default.rb
new file mode 100644
index 0000000000..0cb0eea7d2
--- /dev/null
+++ b/activesupport/lib/active_support/testing/default.rb
@@ -0,0 +1,11 @@
+module ActiveSupport
+ module Testing
+ module Default
+ def run(*args)
+ return if method_name == :default_test
+ super
+ end
+ end
+ end
+end
+