test/subclass_test.rb in rbplusplus-0.9.1 vs test/subclass_test.rb in rbplusplus-1.0

- old
+ new

@@ -10,32 +10,30 @@ node.classes("SuperSuper").ignore # Rice doesn't support multiple-inheritance (neither does Ruby), so for now # until we can fake it, force people to specify node.classes("Multiple").use_superclass( node.classes("Base2") ) + + node.classes.implicit_casting(false) end require 'subclass' # Ignored superclasses should not cause problems with wrapped subclasses - should.not.raise NameError do - Base.new.one.should == Sub.new.one - Base.new.zero.should == Sub.new.zero - end + Base.new.one.should == Sub.new.one + Base.new.zero.should == Sub.new.zero # Template superclasses shouldn't cause problems - should.not.raise NameError do - TemplateSub.new.zero.should == TemplateSub.new.custom - end + TemplateSub.new.zero.should == TemplateSub.new.custom - should.not.raise NameError do + lambda do TemplatePtr.new.custom - end + end.should_not raise_error(NameError) - should.not.raise NameError do + lambda do Multiple.new - end + end.should_not raise_error(NameError) - Multiple.superclass.should.equal Base2 + Multiple.superclass.should == Base2 end end