Permalink
Browse files

use AS::TestCase as the base class

  • Loading branch information...
1 parent a2d68c1 commit b8d8c50785fdad21a524fe5149621f91c97583cd @tenderlove tenderlove committed Jan 6, 2012
Showing with 103 additions and 103 deletions.
  1. +1 −1 activesupport/test/buffered_logger_test.rb
  2. +4 −4 activesupport/test/callback_inheritance_test.rb
  3. +12 −12 activesupport/test/callbacks_test.rb
  4. +1 −1 activesupport/test/clean_logger_test.rb
  5. +1 −1 activesupport/test/concern_test.rb
  6. +11 −11 activesupport/test/core_ext/array_ext_test.rb
  7. +1 −1 activesupport/test/core_ext/bigdecimal_test.rb
  8. +1 −1 activesupport/test/core_ext/blank_test.rb
  9. +1 −1 activesupport/test/core_ext/class/attribute_accessor_test.rb
  10. +1 −1 activesupport/test/core_ext/class/delegating_attributes_test.rb
  11. +1 −1 activesupport/test/core_ext/class_test.rb
  12. +1 −1 activesupport/test/core_ext/date_ext_test.rb
  13. +1 −1 activesupport/test/core_ext/date_time_ext_test.rb
  14. +1 −1 activesupport/test/core_ext/duplicable_test.rb
  15. +1 −1 activesupport/test/core_ext/enumerable_test.rb
  16. +1 −1 activesupport/test/core_ext/file_test.rb
  17. +3 −3 activesupport/test/core_ext/hash_ext_test.rb
  18. +1 −1 activesupport/test/core_ext/integer_ext_test.rb
  19. +3 −3 activesupport/test/core_ext/kernel_test.rb
  20. +2 −2 activesupport/test/core_ext/load_error_test.rb
  21. +1 −1 activesupport/test/core_ext/module/attr_internal_test.rb
  22. +1 −1 activesupport/test/core_ext/module/attribute_accessor_test.rb
  23. +1 −1 activesupport/test/core_ext/module/attribute_aliasing_test.rb
  24. +2 −2 activesupport/test/core_ext/module_test.rb
  25. +1 −1 activesupport/test/core_ext/name_error_test.rb
  26. +3 −3 activesupport/test/core_ext/numeric_ext_test.rb
  27. +1 −1 activesupport/test/core_ext/object/inclusion_test.rb
  28. +1 −1 activesupport/test/core_ext/object/to_param_test.rb
  29. +1 −1 activesupport/test/core_ext/object/to_query_test.rb
  30. +2 −2 activesupport/test/core_ext/object_and_class_ext_test.rb
  31. +1 −1 activesupport/test/core_ext/proc_test.rb
  32. +1 −1 activesupport/test/core_ext/range_ext_test.rb
  33. +1 −1 activesupport/test/core_ext/regexp_ext_test.rb
  34. +2 −2 activesupport/test/core_ext/string_ext_test.rb
  35. +1 −1 activesupport/test/core_ext/time_ext_test.rb
  36. +2 −2 activesupport/test/core_ext/time_with_zone_test.rb
  37. +1 −1 activesupport/test/core_ext/uri_ext_test.rb
  38. +2 −2 activesupport/test/dependencies_test.rb
  39. +1 −1 activesupport/test/deprecation/proxy_wrappers_test.rb
  40. +1 −1 activesupport/test/descendants_tracker_with_autoloading_test.rb
  41. +1 −1 activesupport/test/descendants_tracker_without_autoloading_test.rb
  42. +1 −1 activesupport/test/file_update_checker_test.rb
  43. +1 −1 activesupport/test/gzip_test.rb
  44. +1 −1 activesupport/test/i18n_test.rb
  45. +1 −1 activesupport/test/inflector_test.rb
  46. +1 −1 activesupport/test/json/encoding_test.rb
  47. +1 −1 activesupport/test/load_paths_test.rb
  48. +3 −3 activesupport/test/multibyte_chars_test.rb
  49. +1 −1 activesupport/test/multibyte_conformance.rb
  50. +1 −1 activesupport/test/multibyte_unicode_database_test.rb
  51. +1 −1 activesupport/test/option_merger_test.rb
  52. +1 −1 activesupport/test/ordered_hash_test.rb
  53. +1 −1 activesupport/test/ordered_options_test.rb
  54. +1 −1 activesupport/test/rescuable_test.rb
  55. +1 −1 activesupport/test/string_inquirer_test.rb
  56. +1 −1 activesupport/test/time_zone_test.rb
  57. +1 −1 activesupport/test/transliterate_test.rb
  58. +1 −1 activesupport/test/ts_isolated.rb
  59. +1 −1 activesupport/test/xml_mini/jdom_engine_test.rb
  60. +1 −1 activesupport/test/xml_mini/libxml_engine_test.rb
  61. +1 −1 activesupport/test/xml_mini/libxmlsax_engine_test.rb
  62. +1 −1 activesupport/test/xml_mini/nokogiri_engine_test.rb
  63. +1 −1 activesupport/test/xml_mini/nokogirisax_engine_test.rb
  64. +1 −1 activesupport/test/xml_mini/rexml_engine_test.rb
  65. +1 −1 activesupport/test/xml_mini_test.rb
@@ -5,7 +5,7 @@
require 'tempfile'
require 'active_support/testing/deprecation'
-class BufferedLoggerTest < Test::Unit::TestCase
+class BufferedLoggerTest < ActiveSupport::TestCase
include MultibyteTestHelpers
include ActiveSupport::Testing::Deprecation
@@ -105,7 +105,7 @@ def dispatch
class CountingChild < CountingParent
end
-class BasicCallbacksTest < Test::Unit::TestCase
+class BasicCallbacksTest < ActiveSupport::TestCase
def setup
@index = GrandParent.new("index").dispatch
@update = GrandParent.new("update").dispatch
@@ -126,7 +126,7 @@ def test_basic_per_key3
end
end
-class InheritedCallbacksTest < Test::Unit::TestCase
+class InheritedCallbacksTest < ActiveSupport::TestCase
def setup
@index = Parent.new("index").dispatch
@update = Parent.new("update").dispatch
@@ -147,7 +147,7 @@ def test_partially_excluded
end
end
-class InheritedCallbacksTest2 < Test::Unit::TestCase
+class InheritedCallbacksTest2 < ActiveSupport::TestCase
def setup
@update1 = Child.new("update", :open).dispatch
@update2 = Child.new("update", :closed).dispatch
@@ -162,7 +162,7 @@ def test_crazy_mix_off
end
end
-class DynamicInheritedCallbacks < Test::Unit::TestCase
+class DynamicInheritedCallbacks < ActiveSupport::TestCase
def test_callbacks_looks_to_the_superclass_before_running
child = EmptyChild.new.dispatch
assert !child.performed?
@@ -158,7 +158,7 @@ def save
end
end
- class OneTimeCompileTest < Test::Unit::TestCase
+ class OneTimeCompileTest < ActiveSupport::TestCase
def test_optimized_first_compile
around = OneTimeCompile.new
around.save
@@ -177,7 +177,7 @@ def save
end
end
- class AfterSaveConditionalPersonCallbackTest < Test::Unit::TestCase
+ class AfterSaveConditionalPersonCallbackTest < ActiveSupport::TestCase
def test_after_save_runs_in_the_reverse_order
person = AfterSaveConditionalPerson.new
person.save
@@ -345,7 +345,7 @@ def save
end
end
- class AroundCallbacksTest < Test::Unit::TestCase
+ class AroundCallbacksTest < ActiveSupport::TestCase
def test_save_around
around = AroundPerson.new
around.save
@@ -364,15 +364,15 @@ def test_save_around
end
end
- class AroundCallbackResultTest < Test::Unit::TestCase
+ class AroundCallbackResultTest < ActiveSupport::TestCase
def test_save_around
around = AroundPersonResult.new
around.save
assert_equal :running, around.result
end
end
- class SkipCallbacksTest < Test::Unit::TestCase
+ class SkipCallbacksTest < ActiveSupport::TestCase
def test_skip_person
person = PersonSkipper.new
assert_equal [], person.history
@@ -391,7 +391,7 @@ def test_skip_person
end
end
- class CallbacksTest < Test::Unit::TestCase
+ class CallbacksTest < ActiveSupport::TestCase
def test_save_phone
phone = Phone.new
assert_raise RuntimeError do
@@ -419,7 +419,7 @@ def test_save_person
end
end
- class ConditionalCallbackTest < Test::Unit::TestCase
+ class ConditionalCallbackTest < ActiveSupport::TestCase
def test_save_conditional_person
person = ConditionalPerson.new
person.save
@@ -437,7 +437,7 @@ def test_save_conditional_person
- class ResetCallbackTest < Test::Unit::TestCase
+ class ResetCallbackTest < ActiveSupport::TestCase
def test_save_conditional_person
person = CleanPerson.new
person.save
@@ -567,7 +567,7 @@ def save
end
end
- class UsingObjectTest < Test::Unit::TestCase
+ class UsingObjectTest < ActiveSupport::TestCase
def test_before_object
u = UsingObjectBefore.new
u.save
@@ -592,7 +592,7 @@ def test_block_result_is_returned
end
end
- class CallbackTerminatorTest < Test::Unit::TestCase
+ class CallbackTerminatorTest < ActiveSupport::TestCase
def test_termination
terminator = CallbackTerminator.new
terminator.save
@@ -612,7 +612,7 @@ def test_block_never_called_if_terminated
end
end
- class HyphenatedKeyTest < Test::Unit::TestCase
+ class HyphenatedKeyTest < ActiveSupport::TestCase
def test_save
obj = HyphenatedCallbacks.new
obj.save
@@ -625,7 +625,7 @@ class WriterSkipper < Person
skip_callback :save, :before, :before_save_method, :if => lambda {self.age > 21}
end
- class WriterCallbacksTest < Test::Unit::TestCase
+ class WriterCallbacksTest < ActiveSupport::TestCase
def test_skip_writer
writer = WriterSkipper.new
writer.age = 18
@@ -2,7 +2,7 @@
require 'stringio'
require 'active_support/logger'
-class CleanLoggerTest < Test::Unit::TestCase
+class CleanLoggerTest < ActiveSupport::TestCase
def setup
@out = StringIO.new
@logger = ActiveSupport::Logger.new(@out)
@@ -1,7 +1,7 @@
require 'abstract_unit'
require 'active_support/concern'
-class ConcernTest < Test::Unit::TestCase
+class ConcernTest < ActiveSupport::TestCase
module Baz
extend ActiveSupport::Concern
@@ -6,7 +6,7 @@
require 'active_support/core_ext' # FIXME: pulling in all to_xml extensions
require 'active_support/hash_with_indifferent_access'
-class ArrayExtAccessTests < Test::Unit::TestCase
+class ArrayExtAccessTests < ActiveSupport::TestCase
def test_from
assert_equal %w( a b c d ), %w( a b c d ).from(0)
assert_equal %w( c d ), %w( a b c d ).from(2)
@@ -30,7 +30,7 @@ def test_second_through_tenth
end
end
-class ArrayExtToParamTests < Test::Unit::TestCase
+class ArrayExtToParamTests < ActiveSupport::TestCase
class ToParam < String
def to_param
"#{self}1"
@@ -52,7 +52,7 @@ def test_to_param_array
end
end
-class ArrayExtToSentenceTests < Test::Unit::TestCase
+class ArrayExtToSentenceTests < ActiveSupport::TestCase
def test_plain_array_to_sentence
assert_equal "", [].to_sentence
assert_equal "one", ['one'].to_sentence
@@ -92,7 +92,7 @@ def test_one_non_string_element
end
end
-class ArrayExtToSTests < Test::Unit::TestCase
+class ArrayExtToSTests < ActiveSupport::TestCase
def test_to_s_db
collection = [
Class.new { def id() 1 end }.new,
@@ -105,7 +105,7 @@ def test_to_s_db
end
end
-class ArrayExtGroupingTests < Test::Unit::TestCase
+class ArrayExtGroupingTests < ActiveSupport::TestCase
def test_in_groups_of_with_perfect_fit
groups = []
('a'..'i').to_a.in_groups_of(3) do |group|
@@ -188,7 +188,7 @@ def test_in_groups_without_padding
end
end
-class ArraySplitTests < Test::Unit::TestCase
+class ArraySplitTests < ActiveSupport::TestCase
def test_split_with_empty_array
assert_equal [[]], [].split(0)
end
@@ -209,7 +209,7 @@ def test_split_with_edge_values
end
end
-class ArrayToXmlTests < Test::Unit::TestCase
+class ArrayToXmlTests < ActiveSupport::TestCase
def test_to_xml
xml = [
{ :name => "David", :age => 26, :age_in_millis => 820497600000 },
@@ -299,7 +299,7 @@ def test_to_xml_dups_options
end
end
-class ArrayExtractOptionsTests < Test::Unit::TestCase
+class ArrayExtractOptionsTests < ActiveSupport::TestCase
class HashSubclass < Hash
end
@@ -341,7 +341,7 @@ def test_extract_options_extracts_hwia
end
end
-class ArrayUniqByTests < Test::Unit::TestCase
+class ArrayUniqByTests < ActiveSupport::TestCase
def test_uniq_by
ActiveSupport::Deprecation.silence do
assert_equal [1,2], [1,2,3,4].uniq_by { |i| i.odd? }
@@ -371,7 +371,7 @@ def test_uniq_by!
end
end
-class ArrayWrapperTests < Test::Unit::TestCase
+class ArrayWrapperTests < ActiveSupport::TestCase
class FakeCollection
def to_ary
["foo", "bar"]
@@ -446,7 +446,7 @@ def test_wrap_does_not_complain_if_to_ary_does_not_return_an_array
end
end
-class ArrayPrependAppendTest < Test::Unit::TestCase
+class ArrayPrependAppendTest < ActiveSupport::TestCase
def test_append
assert_equal [1, 2], [1].append(2)
end
@@ -2,7 +2,7 @@
require 'bigdecimal'
require 'active_support/core_ext/big_decimal'
-class BigDecimalTest < Test::Unit::TestCase
+class BigDecimalTest < ActiveSupport::TestCase
def test_to_yaml
assert_match("--- 100000.30020320320000000000000000000000000000001\n", BigDecimal.new('100000.30020320320000000000000000000000000000001').to_yaml)
assert_match("--- .Inf\n", BigDecimal.new('Infinity').to_yaml)
@@ -3,7 +3,7 @@
require 'abstract_unit'
require 'active_support/core_ext/object/blank'
-class BlankTest < Test::Unit::TestCase
+class BlankTest < ActiveSupport::TestCase
BLANK = [ EmptyTrue.new, nil, false, '', ' ', " \n\t \r ", ' ', [], {} ]
NOT = [ EmptyFalse.new, Object.new, true, 0, 1, 'a', [nil], { nil => 0 } ]
@@ -1,7 +1,7 @@
require 'abstract_unit'
require 'active_support/core_ext/class/attribute_accessors'
-class ClassAttributeAccessorTest < Test::Unit::TestCase
+class ClassAttributeAccessorTest < ActiveSupport::TestCase
def setup
@class = Class.new do
cattr_accessor :foo
@@ -20,7 +20,7 @@ class Percy < PercysMom
end
end
-class DelegatingAttributesTest < Test::Unit::TestCase
+class DelegatingAttributesTest < ActiveSupport::TestCase
include DelegatingFixtures
attr_reader :single_class
@@ -2,7 +2,7 @@
require 'active_support/core_ext/class'
require 'set'
-class ClassTest < Test::Unit::TestCase
+class ClassTest < ActiveSupport::TestCase
class Parent; end
class Foo < Parent; end
class Bar < Foo; end
@@ -444,7 +444,7 @@ def with_tz_default(tz = nil)
end
end
-class DateExtBehaviorTest < Test::Unit::TestCase
+class DateExtBehaviorTest < ActiveSupport::TestCase
def test_date_acts_like_date
assert Date.new.acts_like_date?
end
@@ -1,7 +1,7 @@
require 'abstract_unit'
require 'active_support/time'
-class DateTimeExtCalculationsTest < Test::Unit::TestCase
+class DateTimeExtCalculationsTest < ActiveSupport::TestCase
def test_to_s
datetime = DateTime.new(2005, 2, 21, 14, 30, 0, 0)
assert_equal "2005-02-21 14:30:00", datetime.to_s(:db)
@@ -3,7 +3,7 @@
require 'active_support/core_ext/object/duplicable'
require 'active_support/core_ext/numeric/time'
-class DuplicableTest < Test::Unit::TestCase
+class DuplicableTest < ActiveSupport::TestCase
RAISE_DUP = [nil, false, true, :symbol, 1, 2.3, BigDecimal.new('4.56'), 5.seconds]
YES = ['1', Object.new, /foo/, [], {}, Time.now]
NO = [Class.new, Module.new]
@@ -7,7 +7,7 @@ class SummablePayment < Payment
def +(p) self.class.new(price + p.price) end
end
-class EnumerableTests < Test::Unit::TestCase
+class EnumerableTests < ActiveSupport::TestCase
Enumerator = [].each.class
class GenericEnumerable
@@ -1,7 +1,7 @@
require 'abstract_unit'
require 'active_support/core_ext/file'
-class AtomicWriteTest < Test::Unit::TestCase
+class AtomicWriteTest < ActiveSupport::TestCase
def test_atomic_write_without_errors
contents = "Atomic Text"
File.atomic_write(file_name, Dir.pwd) do |file|
@@ -6,7 +6,7 @@
require 'active_support/core_ext/object/conversions'
require 'active_support/inflections'
-class HashExtTest < Test::Unit::TestCase
+class HashExtTest < ActiveSupport::TestCase
class IndifferentHash < HashWithIndifferentAccess
end
@@ -523,7 +523,7 @@ def to_xml(options = {})
end
end
-class HashExtToParamTests < Test::Unit::TestCase
+class HashExtToParamTests < ActiveSupport::TestCase
class ToParam < String
def to_param
"#{self}-1"
@@ -554,7 +554,7 @@ def test_to_param_orders_by_key_in_ascending_order
end
end
-class HashToXmlTest < Test::Unit::TestCase
+class HashToXmlTest < ActiveSupport::TestCase
def setup
@xml_options = { :root => :person, :skip_instruct => true, :indent => 0 }
end
@@ -1,7 +1,7 @@
require 'abstract_unit'
require 'active_support/core_ext/integer'
-class IntegerExtTest < Test::Unit::TestCase
+class IntegerExtTest < ActiveSupport::TestCase
PRIME = 22953686867719691230002707821868552601124472329079
def test_multiple_of
Oops, something went wrong.

0 comments on commit b8d8c50

Please sign in to comment.