aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_singleton.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-02 02:18:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-02 02:18:44 +0000
commitae042f21fb695fc80eb19273fa542e8dad85f19f (patch)
tree6b64fce04b19a8e1531f60a7d3d47c8a9fc97a20 /test/test_singleton.rb
parent21f2c194bbf781d9228584f3e93f4a93b33f5632 (diff)
downloadruby-ae042f21fb695fc80eb19273fa542e8dad85f19f.tar.gz
use assert_raise
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_singleton.rb')
-rw-r--r--test/test_singleton.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_singleton.rb b/test/test_singleton.rb
index 259f9c5e0f..36d49372c1 100644
--- a/test/test_singleton.rb
+++ b/test/test_singleton.rb
@@ -20,19 +20,19 @@ class TestSingleton < Test::Unit::TestCase
end
def test_initialize_raises_exception
- assert_raises NoMethodError do
+ assert_raise NoMethodError do
SingletonTest.new
end
end
def test_allocate_raises_exception
- assert_raises NoMethodError do
+ assert_raise NoMethodError do
SingletonTest.allocate
end
end
def test_clone_raises_exception
- exception = assert_raises TypeError do
+ exception = assert_raise TypeError do
SingletonTest.instance.clone
end
@@ -42,7 +42,7 @@ class TestSingleton < Test::Unit::TestCase
end
def test_dup_raises_exception
- exception = assert_raises TypeError do
+ exception = assert_raise TypeError do
SingletonTest.instance.dup
end
@@ -54,7 +54,7 @@ class TestSingleton < Test::Unit::TestCase
def test_include_in_module_raises_exception
mod = Module.new
- exception = assert_raises TypeError do
+ exception = assert_raise TypeError do
mod.class_eval do
include Singleton
end
@@ -66,7 +66,7 @@ class TestSingleton < Test::Unit::TestCase
end
def test_extending_singleton_raises_exception
- assert_raises NoMethodError do
+ assert_raise NoMethodError do
'foo'.extend Singleton
end
end