Permalink
Browse files

Explicit test dependencies

  • Loading branch information...
jeremy committed Mar 29, 2009
1 parent e0f56fc commit 7bcfff4457d98afca43b72c5ecb083fb6cab0a93
@@ -1,6 +1,7 @@
require 'abstract_unit'
require 'stringio'
require 'fileutils'
+require 'active_support/buffered_logger'
class BufferedLoggerTest < Test::Unit::TestCase
def setup
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/cache'
class CacheKeyTest < ActiveSupport::TestCase
def test_expand_cache_key
@@ -1,5 +1,6 @@
require 'abstract_unit'
require 'stringio'
+require 'active_support/core_ext/logger'
class CleanLoggerTest < Test::Unit::TestCase
def setup
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/cgi'
class EscapeSkippingSlashesTest < Test::Unit::TestCase
def test_array
@@ -1,4 +1,6 @@
require 'abstract_unit'
+require 'active_support/core_ext/array'
+require 'active_support/core_ext/enumerable'
Payment = Struct.new(:price)
class SummablePayment < Payment
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/hash'
class HashExtTest < Test::Unit::TestCase
def setup
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/integer'
class IntegerExtTest < Test::Unit::TestCase
def test_even
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/kernel'
class KernelTest < Test::Unit::TestCase
def test_silence_warnings
@@ -41,3 +42,18 @@ def test_silence_stderr_with_return_value
assert_equal 1, silence_stderr { 1 }
end
end
+
+class KernelSupressTest < Test::Unit::TestCase
+ def test_reraise
+ assert_raise(LoadError) do
+ suppress(ArgumentError) { raise LoadError }
+ end
+ end
+
+ def test_supression
+ suppress(ArgumentError) { raise ArgumentError }
+ suppress(LoadError) { raise LoadError }
+ suppress(LoadError, ArgumentError) { raise LoadError }
+ suppress(LoadError, ArgumentError) { raise ArgumentError }
+ end
+end
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/load_error'
class TestMissingSourceFile < Test::Unit::TestCase
def test_with_require
@@ -1,5 +1,8 @@
require 'abstract_unit'
+require 'active_support/core_ext/class/attribute_accessors'
+require 'active_support/core_ext/module/synchronization'
+
class SynchronizationTest < Test::Unit::TestCase
def setup
@target = Class.new
@@ -82,4 +85,4 @@ class << @target
assert_nothing_raised { @target.to_s; @target.to_s }
assert_equal 2, @target.mutex.sync_count
end
-end
+end
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/module'
module One
Constant1 = "Hello World"
@@ -1,5 +1,7 @@
require 'abstract_unit'
+require 'active_support/core_ext/numeric/bytes'
+
class NumericExtTimeAndDateTimeTest < Test::Unit::TestCase
def setup
@now = Time.local(2005,2,10,15,30,45)
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/object'
class ClassA; end
class ClassB < ClassA; end
@@ -108,16 +109,6 @@ def test_subclasses_of_doesnt_find_anonymous_classes
end
class ObjectTests < Test::Unit::TestCase
- def test_suppress_re_raises
- assert_raise(LoadError) { suppress(ArgumentError) {raise LoadError} }
- end
- def test_suppress_supresses
- suppress(ArgumentError) { raise ArgumentError }
- suppress(LoadError) { raise LoadError }
- suppress(LoadError, ArgumentError) { raise LoadError }
- suppress(LoadError, ArgumentError) { raise ArgumentError }
- end
-
def test_extended_by
foo = Foo.new
assert foo.extended_by.include?(Bar)
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/pathname'
class TestPathname < Test::Unit::TestCase
def test_clean_within
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/range'
class RangeTest < Test::Unit::TestCase
def test_to_s_from_dates
@@ -3,6 +3,9 @@
require 'abstract_unit'
require 'inflector_test_cases'
+require 'active_support/core_ext/string/conversions'
+require 'active_support/core_ext/string/filters'
+
class StringInflectionsTest < Test::Unit::TestCase
include InflectorTestCases
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/time_with_zone'
class TimeWithZoneTest < Test::Unit::TestCase
@@ -1,5 +1,6 @@
# encoding: utf-8
require 'abstract_unit'
+require 'active_support/json'
class TestJSONEncoding < Test::Unit::TestCase
class Foo
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/core_ext/object/misc'
class OptionMergerTest < Test::Unit::TestCase
def setup

0 comments on commit 7bcfff4

Please sign in to comment.