aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/dependencies_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/dependencies_test.rb')
-rw-r--r--activesupport/test/dependencies_test.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb
index fe04b91f2b..a21f09403f 100644
--- a/activesupport/test/dependencies_test.rb
+++ b/activesupport/test/dependencies_test.rb
@@ -43,7 +43,7 @@ class DependenciesTest < Test::Unit::TestCase
end
def test_missing_dependency_raises_missing_source_file
- assert_raises(MissingSourceFile) { require_dependency("missing_service") }
+ assert_raise(MissingSourceFile) { require_dependency("missing_service") }
end
def test_missing_association_raises_nothing
@@ -136,10 +136,10 @@ class DependenciesTest < Test::Unit::TestCase
def test_non_existing_const_raises_name_error
with_loading 'autoloading_fixtures' do
- assert_raises(NameError) { DoesNotExist }
- assert_raises(NameError) { NoModule::DoesNotExist }
- assert_raises(NameError) { A::DoesNotExist }
- assert_raises(NameError) { A::B::DoesNotExist }
+ assert_raise(NameError) { DoesNotExist }
+ assert_raise(NameError) { NoModule::DoesNotExist }
+ assert_raise(NameError) { A::DoesNotExist }
+ assert_raise(NameError) { A::B::DoesNotExist }
end
end
@@ -206,8 +206,8 @@ class DependenciesTest < Test::Unit::TestCase
def failing_test_access_thru_and_upwards_fails
with_loading 'autoloading_fixtures' do
assert ! defined?(ModuleFolder)
- assert_raises(NameError) { ModuleFolder::Object }
- assert_raises(NameError) { ModuleFolder::NestedClass::Object }
+ assert_raise(NameError) { ModuleFolder::Object }
+ assert_raise(NameError) { ModuleFolder::NestedClass::Object }
Object.__send__ :remove_const, :ModuleFolder
end
end
@@ -382,7 +382,7 @@ class DependenciesTest < Test::Unit::TestCase
with_loading 'autoloading_fixtures' do
require_dependency '././counting_loader'
assert_equal 1, $counting_loaded_times
- assert_raises(ArgumentError) { ActiveSupport::Dependencies.load_missing_constant Object, :CountingLoader }
+ assert_raise(ArgumentError) { ActiveSupport::Dependencies.load_missing_constant Object, :CountingLoader }
assert_equal 1, $counting_loaded_times
end
end
@@ -421,7 +421,7 @@ class DependenciesTest < Test::Unit::TestCase
def test_nested_load_error_isnt_rescued
with_loading 'dependencies' do
- assert_raises(MissingSourceFile) do
+ assert_raise(MissingSourceFile) do
RequiresNonexistent1
end
end
@@ -494,7 +494,7 @@ class DependenciesTest < Test::Unit::TestCase
def test_unloadable_should_fail_with_anonymous_modules
with_loading 'autoloading_fixtures' do
m = Module.new
- assert_raises(ArgumentError) { m.unloadable }
+ assert_raise(ArgumentError) { m.unloadable }
end
end
@@ -584,7 +584,7 @@ class DependenciesTest < Test::Unit::TestCase
end
def test_new_constants_in_with_illegal_module_name_raises_correct_error
- assert_raises(NameError) do
+ assert_raise(NameError) do
ActiveSupport::Dependencies.new_constants_in("Illegal-Name") {}
end
end