Permalink
Browse files

Add superclass tests for Exceptions

  • Loading branch information...
1 parent 00caf25 commit c78dc2930c6b8c927e6c1415ecbc13e727c3637c @bovi bovi committed Jun 3, 2012
View
@@ -13,3 +13,8 @@
ArgumentError.class == Class and e2.class == ArgumentError
end
+
+assert('ArgumentError superclass', '15.2.24.2') do
+ ArgumentError.superclass == StandardError
+end
+
View
@@ -5,6 +5,10 @@
Exception.class == Class
end
+assert('Exception superclass', '15.2.22.2') do
+ Exception.superclass == Object
+end
+
assert('Exception.exception', '15.2.22.4.1') do
e = Exception.exception('a')
View
@@ -4,3 +4,8 @@
assert('IndexError', '15.2.33') do
IndexError.class == Class
end
+
+assert('IndexError superclass', '15.2.33.2') do
+ IndexError.superclass == StandardError
+end
+
View
@@ -5,6 +5,10 @@
NameError.class == Class
end
+assert('NameError superclass', '15.2.31.2') do
+ NameError.superclass == StandardError
+end
+
# TODO 15.2.31.2.1 NameError#name
assert('NameError#initialize', '15.2.31.2.2') do
View
@@ -11,3 +11,8 @@
NoMethodError.class == Class and e2.class == NoMethodError
end
+
+assert('NoMethodError superclass', '15.2.32.2') do
+ NoMethodError.superclass == NameError
+end
+
View
@@ -4,3 +4,8 @@
assert('RangeError', '15.2.26') do
RangeError.class == Class
end
+
+assert('RangeError superclass', '15.2.26.2') do
+ RangeError.superclass == StandardError
+end
+
View
@@ -4,3 +4,8 @@
assert('StandardError', '15.2.23') do
StandardError.class == Class
end
+
+assert('StandardError superclass', '15.2.23.2') do
+ StandardError.superclass == Exception
+end
+
View
@@ -4,3 +4,8 @@
assert('TypeError', '15.2.29') do
TypeError.class == Class
end
+
+assert('TypeError superclass', '15.2.29.2') do
+ TypeError.superclass == StandardError
+end
+

0 comments on commit c78dc29

Please sign in to comment.