aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-06-22 13:44:21 +0300
committerMichael Koziarski <michael@koziarski.com>2008-07-04 10:41:39 +0300
commit51e13d51adee3c69feab30aa4c0b08d2278ccc5f (patch)
tree9c48ac4e22aae8aea84b82c76bd99fa93f5a92c8 /activesupport/lib
parent01637796d712943ebf9e9a76aa5c708edfab4d02 (diff)
downloadrails-51e13d51adee3c69feab30aa4c0b08d2278ccc5f.tar.gz
rails-51e13d51adee3c69feab30aa4c0b08d2278ccc5f.tar.bz2
rails-51e13d51adee3c69feab30aa4c0b08d2278ccc5f.zip
Move test related core_ext stuff out of regular core ext to prevent nasty surprises when you require active_support then use Test::Unit directly.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/test.rb1
-rw-r--r--activesupport/lib/active_support/test_case.rb6
-rw-r--r--activesupport/lib/active_support/testing/core_ext/test.rb6
-rw-r--r--activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb (renamed from activesupport/lib/active_support/core_ext/test/unit/assertions.rb)7
4 files changed, 11 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/core_ext/test.rb b/activesupport/lib/active_support/core_ext/test.rb
deleted file mode 100644
index c0b19bdc58..0000000000
--- a/activesupport/lib/active_support/core_ext/test.rb
+++ /dev/null
@@ -1 +0,0 @@
-require 'active_support/core_ext/test/unit/assertions'
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb
index 2fd02d5313..0f531b0c79 100644
--- a/activesupport/lib/active_support/test_case.rb
+++ b/activesupport/lib/active_support/test_case.rb
@@ -1,11 +1,7 @@
require 'test/unit/testcase'
-require 'active_support/testing/setup_and_teardown'
require 'active_support/testing/default'
+require 'active_support/testing/core_ext/test'
-# TODO: move to core_ext
-class Test::Unit::TestCase #:nodoc:
- include ActiveSupport::Testing::SetupAndTeardown
-end
module ActiveSupport
class TestCase < Test::Unit::TestCase
diff --git a/activesupport/lib/active_support/testing/core_ext/test.rb b/activesupport/lib/active_support/testing/core_ext/test.rb
new file mode 100644
index 0000000000..d3f38f0bc7
--- /dev/null
+++ b/activesupport/lib/active_support/testing/core_ext/test.rb
@@ -0,0 +1,6 @@
+require 'active_support/testing/core_ext/test/unit/assertions'
+require 'active_support/testing/setup_and_teardown'
+
+class Test::Unit::TestCase #:nodoc:
+ include ActiveSupport::Testing::SetupAndTeardown
+end \ No newline at end of file
diff --git a/activesupport/lib/active_support/core_ext/test/unit/assertions.rb b/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb
index 77fe325fb4..70a44eab8c 100644
--- a/activesupport/lib/active_support/core_ext/test/unit/assertions.rb
+++ b/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb
@@ -1,9 +1,10 @@
-module Test
- module Unit
+require 'test/unit/assertions'
+module Test
+ module Unit
#--
# FIXME: no Proc#binding in Ruby 2, must change this API
#++
- module Assertions
+ module Assertions
# Test numeric difference between the return value of an expression as a result of what is evaluated
# in the yielded block.
#