diff options
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/descendants_tracker_with_autoloading_test.rb | 6 | ||||
-rw-r--r-- | activesupport/test/ordered_options_test.rb | 20 | ||||
-rw-r--r-- | activesupport/test/testing/constant_lookup_test.rb | 10 |
3 files changed, 23 insertions, 13 deletions
diff --git a/activesupport/test/descendants_tracker_with_autoloading_test.rb b/activesupport/test/descendants_tracker_with_autoloading_test.rb index ab1be296f8..a2ae066a21 100644 --- a/activesupport/test/descendants_tracker_with_autoloading_test.rb +++ b/activesupport/test/descendants_tracker_with_autoloading_test.rb @@ -6,7 +6,7 @@ require 'descendants_tracker_test_cases' class DescendantsTrackerWithAutoloadingTest < ActiveSupport::TestCase include DescendantsTrackerTestCases - def test_clear_with_autoloaded_parent_children_and_granchildren + def test_clear_with_autoloaded_parent_children_and_grandchildren mark_as_autoloaded(*ALL) do ActiveSupport::DescendantsTracker.clear ALL.each do |k| @@ -15,7 +15,7 @@ class DescendantsTrackerWithAutoloadingTest < ActiveSupport::TestCase end end - def test_clear_with_autoloaded_children_and_granchildren + def test_clear_with_autoloaded_children_and_grandchildren mark_as_autoloaded Child1, Grandchild1, Grandchild2 do ActiveSupport::DescendantsTracker.clear assert_equal_sets [Child2], Parent.descendants @@ -23,7 +23,7 @@ class DescendantsTrackerWithAutoloadingTest < ActiveSupport::TestCase end end - def test_clear_with_autoloaded_granchildren + def test_clear_with_autoloaded_grandchildren mark_as_autoloaded Grandchild1, Grandchild2 do ActiveSupport::DescendantsTracker.clear assert_equal_sets [Child1, Child2], Parent.descendants diff --git a/activesupport/test/ordered_options_test.rb b/activesupport/test/ordered_options_test.rb index f60f9a58e3..fdc745b23b 100644 --- a/activesupport/test/ordered_options_test.rb +++ b/activesupport/test/ordered_options_test.rb @@ -7,13 +7,13 @@ class OrderedOptionsTest < ActiveSupport::TestCase assert_nil a[:not_set] - a[:allow_concurreny] = true + a[:allow_concurrency] = true assert_equal 1, a.size - assert a[:allow_concurreny] + assert a[:allow_concurrency] - a[:allow_concurreny] = false + a[:allow_concurrency] = false assert_equal 1, a.size - assert !a[:allow_concurreny] + assert !a[:allow_concurrency] a["else_where"] = 56 assert_equal 2, a.size @@ -23,10 +23,10 @@ class OrderedOptionsTest < ActiveSupport::TestCase def test_looping a = ActiveSupport::OrderedOptions.new - a[:allow_concurreny] = true + a[:allow_concurrency] = true a["else_where"] = 56 - test = [[:allow_concurreny, true], [:else_where, 56]] + test = [[:allow_concurrency, true], [:else_where, 56]] a.each_with_index do |(key, value), index| assert_equal test[index].first, key @@ -39,13 +39,13 @@ class OrderedOptionsTest < ActiveSupport::TestCase assert_nil a.not_set - a.allow_concurreny = true + a.allow_concurrency = true assert_equal 1, a.size - assert a.allow_concurreny + assert a.allow_concurrency - a.allow_concurreny = false + a.allow_concurrency = false assert_equal 1, a.size - assert !a.allow_concurreny + assert !a.allow_concurrency a.else_where = 56 assert_equal 2, a.size diff --git a/activesupport/test/testing/constant_lookup_test.rb b/activesupport/test/testing/constant_lookup_test.rb index 19280ba74a..aca2951450 100644 --- a/activesupport/test/testing/constant_lookup_test.rb +++ b/activesupport/test/testing/constant_lookup_test.rb @@ -1,4 +1,5 @@ require 'abstract_unit' +require 'dependencies_test_helpers' class Foo; end class Bar < Foo @@ -10,6 +11,7 @@ module FooBar; end class ConstantLookupTest < ActiveSupport::TestCase include ActiveSupport::Testing::ConstantLookup + include DependenciesTestHelpers def find_foo(name) self.class.determine_constant_from_test_name(name) do |constant| @@ -56,4 +58,12 @@ class ConstantLookupTest < ActiveSupport::TestCase assert_nil find_module("DoesntExist::Nadda::Nope") assert_nil find_module("DoesntExist::Nadda::Nope::NotHere") end + + def test_does_not_swallow_exception_on_no_method_error + assert_raises(NoMethodError) { + with_autoloading_fixtures { + self.class.determine_constant_from_test_name("RaisesNoMethodError") + } + } + end end |