From f28bd9557c669cd63c31704202a46dd83f0a4102 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 22 Apr 2009 17:41:28 -0700 Subject: Fix dependencies revealed by testing in isolation --- activesupport/test/core_ext/array_ext_test.rb | 3 +++ activesupport/test/core_ext/blank_test.rb | 1 + activesupport/test/core_ext/class/attribute_accessor_test.rb | 1 + .../test/core_ext/class/class_inheritable_attributes_test.rb | 1 + activesupport/test/core_ext/date_time_ext_test.rb | 1 + activesupport/test/core_ext/duplicable_test.rb | 2 ++ activesupport/test/core_ext/duration_test.rb | 1 + activesupport/test/core_ext/exception_test.rb | 1 + activesupport/test/core_ext/hash_ext_test.rb | 2 ++ .../test/core_ext/module/attr_accessor_with_default_test.rb | 1 + activesupport/test/core_ext/module/attr_internal_test.rb | 7 ++++--- activesupport/test/core_ext/module/attribute_accessor_test.rb | 1 + activesupport/test/core_ext/module/model_naming_test.rb | 1 + activesupport/test/core_ext/name_error_test.rb | 1 + activesupport/test/core_ext/numeric_ext_test.rb | 5 +++-- activesupport/test/core_ext/object_and_class_ext_test.rb | 2 ++ activesupport/test/core_ext/proc_test.rb | 1 + activesupport/test/core_ext/range_ext_test.rb | 1 + activesupport/test/core_ext/string_ext_test.rb | 1 + activesupport/test/core_ext/time_ext_test.rb | 1 + activesupport/test/core_ext/time_with_zone_test.rb | 1 + 21 files changed, 31 insertions(+), 5 deletions(-) (limited to 'activesupport/test/core_ext') diff --git a/activesupport/test/core_ext/array_ext_test.rb b/activesupport/test/core_ext/array_ext_test.rb index 112cb998b1..24d33896ce 100644 --- a/activesupport/test/core_ext/array_ext_test.rb +++ b/activesupport/test/core_ext/array_ext_test.rb @@ -1,6 +1,9 @@ require 'abstract_unit' require 'active_support/core_ext/array' require 'active_support/core_ext/big_decimal' +require 'active_support/core_ext/object/conversions' + +require 'active_support/core_ext' # FIXME: pulling in all to_xml extensions class ArrayExtAccessTests < Test::Unit::TestCase def test_from diff --git a/activesupport/test/core_ext/blank_test.rb b/activesupport/test/core_ext/blank_test.rb index 00fea74639..1dbbf3ff30 100644 --- a/activesupport/test/core_ext/blank_test.rb +++ b/activesupport/test/core_ext/blank_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/object/blank' class EmptyTrue def empty?() true; end diff --git a/activesupport/test/core_ext/class/attribute_accessor_test.rb b/activesupport/test/core_ext/class/attribute_accessor_test.rb index 85d0dd89e2..2214ba9894 100644 --- a/activesupport/test/core_ext/class/attribute_accessor_test.rb +++ b/activesupport/test/core_ext/class/attribute_accessor_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/class/attribute_accessors' class ClassAttributeAccessorTest < Test::Unit::TestCase def setup diff --git a/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb b/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb index 7f859772e7..eeda468d9c 100644 --- a/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +++ b/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/class/inheritable_attributes' class ClassInheritableAttributesTest < Test::Unit::TestCase def setup diff --git a/activesupport/test/core_ext/date_time_ext_test.rb b/activesupport/test/core_ext/date_time_ext_test.rb index 45eb52c720..a7b179b2be 100644 --- a/activesupport/test/core_ext/date_time_ext_test.rb +++ b/activesupport/test/core_ext/date_time_ext_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/date_time' class DateTimeExtCalculationsTest < Test::Unit::TestCase def test_to_s diff --git a/activesupport/test/core_ext/duplicable_test.rb b/activesupport/test/core_ext/duplicable_test.rb index 8b6127f31e..6e1f876959 100644 --- a/activesupport/test/core_ext/duplicable_test.rb +++ b/activesupport/test/core_ext/duplicable_test.rb @@ -1,4 +1,6 @@ require 'abstract_unit' +require 'bigdecimal' +require 'active_support/core_ext/object/duplicable' class DuplicableTest < Test::Unit::TestCase NO = [nil, false, true, :symbol, 1, 2.3, BigDecimal.new('4.56'), Class.new] diff --git a/activesupport/test/core_ext/duration_test.rb b/activesupport/test/core_ext/duration_test.rb index d4a4627e3e..ea6979bc6b 100644 --- a/activesupport/test/core_ext/duration_test.rb +++ b/activesupport/test/core_ext/duration_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core/time' class DurationTest < ActiveSupport::TestCase def test_inspect diff --git a/activesupport/test/core_ext/exception_test.rb b/activesupport/test/core_ext/exception_test.rb index dabd8c7c06..e63842c0bd 100644 --- a/activesupport/test/core_ext/exception_test.rb +++ b/activesupport/test/core_ext/exception_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/exception' class ExceptionExtTests < Test::Unit::TestCase diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index bbb1c631f9..d65a5323bf 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -1,5 +1,7 @@ require 'abstract_unit' require 'active_support/core_ext/hash' +require 'bigdecimal' +require 'active_support/core_ext/string/access' class HashExtTest < Test::Unit::TestCase def setup diff --git a/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb b/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb index 7c59348af9..7c0d0bb242 100644 --- a/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +++ b/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/module/attr_accessor_with_default' class AttrAccessorWithDefaultTest < Test::Unit::TestCase def setup diff --git a/activesupport/test/core_ext/module/attr_internal_test.rb b/activesupport/test/core_ext/module/attr_internal_test.rb index 52833019e7..93578c9610 100644 --- a/activesupport/test/core_ext/module/attr_internal_test.rb +++ b/activesupport/test/core_ext/module/attr_internal_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/module/attr_internal' class AttrInternalTest < Test::Unit::TestCase def setup @@ -37,8 +38,8 @@ class AttrInternalTest < Test::Unit::TestCase end def test_naming_format - assert_equal '@_%s', @target.attr_internal_naming_format - assert_nothing_raised { @target.attr_internal_naming_format = '@abc%sdef' } + assert_equal '@_%s', Module.attr_internal_naming_format + assert_nothing_raised { Module.attr_internal_naming_format = '@abc%sdef' } @target.attr_internal :foo assert !@instance.instance_variable_defined?('@_foo') @@ -47,6 +48,6 @@ class AttrInternalTest < Test::Unit::TestCase assert !@instance.instance_variable_defined?('@_foo') assert @instance.instance_variable_defined?('@abcfoodef') ensure - @target.attr_internal_naming_format = '@_%s' + Module.attr_internal_naming_format = '@_%s' end end diff --git a/activesupport/test/core_ext/module/attribute_accessor_test.rb b/activesupport/test/core_ext/module/attribute_accessor_test.rb index 96975085cf..bd9461e62c 100644 --- a/activesupport/test/core_ext/module/attribute_accessor_test.rb +++ b/activesupport/test/core_ext/module/attribute_accessor_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/module/attribute_accessors' class ModuleAttributeAccessorTest < Test::Unit::TestCase def setup diff --git a/activesupport/test/core_ext/module/model_naming_test.rb b/activesupport/test/core_ext/module/model_naming_test.rb index d08349dd97..da3b6c4932 100644 --- a/activesupport/test/core_ext/module/model_naming_test.rb +++ b/activesupport/test/core_ext/module/model_naming_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/module/model_naming' class ModelNamingTest < Test::Unit::TestCase def setup diff --git a/activesupport/test/core_ext/name_error_test.rb b/activesupport/test/core_ext/name_error_test.rb index bae004809f..10913e2ade 100644 --- a/activesupport/test/core_ext/name_error_test.rb +++ b/activesupport/test/core_ext/name_error_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/name_error' class NameErrorTest < Test::Unit::TestCase def test_name_error_should_set_missing_name diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb index 9cca4d3aaf..74b086fa9c 100644 --- a/activesupport/test/core_ext/numeric_ext_test.rb +++ b/activesupport/test/core_ext/numeric_ext_test.rb @@ -1,6 +1,7 @@ require 'abstract_unit' - -require 'active_support/core_ext/numeric/bytes' +require 'active_support/core_ext/numeric' +require 'active_support/core_ext/integer' +require 'active_support/core/time' class NumericExtTimeAndDateTimeTest < Test::Unit::TestCase def setup diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index c919698c0f..8869b053e6 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -1,5 +1,7 @@ require 'abstract_unit' require 'active_support/core_ext/object' +require 'active_support/core_ext/class/removal' +require 'active_support/core/time' class ClassA; end class ClassB < ClassA; end diff --git a/activesupport/test/core_ext/proc_test.rb b/activesupport/test/core_ext/proc_test.rb index 29f85371de..dc7b2c957d 100644 --- a/activesupport/test/core_ext/proc_test.rb +++ b/activesupport/test/core_ext/proc_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core_ext/proc' class ProcTests < Test::Unit::TestCase def test_bind_returns_method_with_changed_self diff --git a/activesupport/test/core_ext/range_ext_test.rb b/activesupport/test/core_ext/range_ext_test.rb index 76e05e9954..2565c56b8a 100644 --- a/activesupport/test/core_ext/range_ext_test.rb +++ b/activesupport/test/core_ext/range_ext_test.rb @@ -1,5 +1,6 @@ require 'abstract_unit' require 'active_support/core_ext/range' +require 'active_support/core_ext/date/conversions' class RangeTest < Test::Unit::TestCase def test_to_s_from_dates diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index a357ba5852..237a843f9a 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -4,6 +4,7 @@ require 'abstract_unit' require 'inflector_test_cases' require 'active_support/core_ext/string' +require 'active_support/core_ext/time' class StringInflectionsTest < Test::Unit::TestCase include InflectorTestCases diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb index 8ee4904036..3bf7b789ce 100644 --- a/activesupport/test/core_ext/time_ext_test.rb +++ b/activesupport/test/core_ext/time_ext_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'active_support/core/time' class TimeExtCalculationsTest < Test::Unit::TestCase def test_seconds_since_midnight diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index 3dec4c95f4..612a50c225 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -1,5 +1,6 @@ require 'abstract_unit' require 'active_support/time_with_zone' +require 'active_support/json' class TimeWithZoneTest < Test::Unit::TestCase -- cgit v1.2.3