diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-06-22 13:44:21 +0300 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-07-04 10:41:39 +0300 |
commit | 51e13d51adee3c69feab30aa4c0b08d2278ccc5f (patch) | |
tree | 9c48ac4e22aae8aea84b82c76bd99fa93f5a92c8 /activesupport | |
parent | 01637796d712943ebf9e9a76aa5c708edfab4d02 (diff) | |
download | rails-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')
-rw-r--r-- | activesupport/CHANGELOG | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/test.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 6 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/core_ext/test.rb | 6 | ||||
-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 |
5 files changed, 13 insertions, 9 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 73c965b1db..983e7d0dac 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,7 @@ *Edge* +* Move the test related core_ext stuff out of core_ext so it's only loaded by the test helpers. [Michael Koziarski] + * Add Inflection rules for String#humanize. #535 [dcmanges] ActiveSupport::Inflector.inflections do |inflect| 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. # |