1 require File.dirname(__FILE__) + '/../spec_helper'
2 require File.dirname(__FILE__) + '/subtend_helper'
4 compile_extension('subtend_constants')
5 require File.dirname(__FILE__) + '/ext/subtend_constants'
7 describe "SubtendConstants" do
9 @s = SubtendConstants.new
12 it "rb_cObject should return the Object class" do
13 @s.rb_object.should == Object
16 it "rb_mKernel should return the Kernel class" do
17 @s.rb_kernel.should == Kernel
20 it "rb_eException should return the Exception class" do
21 @s.rb_exception.should == Exception
24 it "rb_eSystemExit should return the SystemExit class" do
25 @s.rb_system_exit.should == SystemExit
28 it "rb_eInterrupt should return the Interrupt class" do
29 @s.rb_interrupt.should == Interrupt
32 it "rb_eSignal should return the SignalException class" do
33 @s.rb_signal.should == SignalException
36 it "rb_eStandardError should return the StandardError class" do
37 @s.rb_standard_error.should == StandardError
40 it "rb_eRuntimeError should return the RuntimeError class" do
41 @s.rb_runtime_error.should == RuntimeError
44 it "rb_eTypeError should return the TypeError class" do
45 @s.rb_type_error.should == TypeError
48 it "rb_eArgError should return the ArgumentError class" do
49 @s.rb_arg_error.should == ArgumentError
52 it "rb_eIndexError should return the IndexError class" do
53 @s.rb_index_error.should == IndexError
56 it "rb_eRangeError should return the RangeError class" do
57 @s.rb_range_error.should == RangeError
60 it "rb_eNameError should return the NameError class" do
61 @s.rb_name_error.should == NameError
64 it "rb_eNoMethodError should return the NoMethodError class" do
65 @s.rb_no_method_error.should == NoMethodError
68 it "rb_eSecurityError should return the SecurityError class" do
69 @s.rb_security_error.should == SecurityError
72 it "rb_eNotImpError should return the NotImplementedError class" do
73 @s.rb_not_imp_error.should == NotImplementedError
76 it "rb_eNoMemError should return the NoMemoryError class" do
77 @s.rb_no_mem_error.should == NoMemoryError
80 it "rb_eScriptError should return the ScriptError class" do
81 @s.rb_script_error.should == ScriptError
84 it "rb_eSyntaxError should return the SyntaxError class" do
85 @s.rb_syntax_error.should == SyntaxError
88 it "rb_eLoadError should return the LoadError class" do
89 @s.rb_load_error.should == LoadError
92 it "rb_eSystemCallError should return the SystemCallError class" do
93 @s.rb_system_call_error.should == SystemCallError
96 it "rb_mErrno should return the Errno class" do
97 @s.rb_errno.should == Errno
100 it "rb_eIOError should return the IOError class" do
101 @s.rb_io_error.should == IOError
104 it "rb_eLocalJumpError should return the LocalJumpError class" do
105 @s.rb_local_jump_error.should == LocalJumpError
108 it "rb_eEOFError should return the EOFError class" do
109 @s.rb_eof_error.should == EOFError
112 it "rb_eThreadError should return the ThreadError class" do
113 @s.rb_thread_error.should == ThreadError
116 it "rb_eZeroDivError should return the ZeroDivisionError class" do
117 @s.rb_zero_division_error.should == ZeroDivisionError
120 it "rb_eFloatDomainError should return the FloatDomainError class" do
121 @s.rb_float_domain_error.should == FloatDomainError
124 it "rb_eSysStackError should return the SystemStackError class" do
125 @s.rb_sys_stack_error.should == SystemStackError
128 it "rb_eRegexpError should return the RegexpError class" do
129 @s.rb_regexp_error.should == RegexpError