spec/treequel/mixins_spec.rb in treequel-1.1.1 vs spec/treequel/mixins_spec.rb in treequel-1.2.0pre320
- old
+ new
@@ -10,11 +10,12 @@
$LOAD_PATH.unshift( basedir ) unless $LOAD_PATH.include?( basedir )
$LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir )
$LOAD_PATH.unshift( extdir ) unless $LOAD_PATH.include?( extdir )
}
-require 'spec'
+require 'rspec'
+
require 'spec/lib/constants'
require 'spec/lib/helpers'
require 'treequel'
require 'treequel/mixins'
@@ -247,14 +248,11 @@
it "passes any arguments through to the delegate object's method" do
@subobj.should_receive( :delegated_method ).with( :arg1, :arg2 )
@obj.delegated_method( :arg1, :arg2 )
end
- it "reports errors from its caller's perspective" do
- pending "doesn't work under 1.9, but may not be necessary" if
- vvec(RUBY_VERSION) > vvec('1.8.7')
-
+ it "reports errors from its caller's perspective", :ruby_1_8_only => true do
begin
@obj.erroring_delegated_method
rescue NoMethodError => err
err.message.should =~ /nonexistant_method/
err.backtrace.first.should =~ /#{__FILE__}/
@@ -296,13 +294,10 @@
it "passes any arguments through to the delegate's method" do
@subobj.should_receive( :delegated_method ).with( :arg1, :arg2 )
@obj.delegated_method( :arg1, :arg2 )
end
- it "reports errors from its caller's perspective" do
- pending "doesn't work under 1.9, but may not be necessary" if
- vvec(RUBY_VERSION) > vvec('1.8.7')
-
+ it "reports errors from its caller's perspective", :ruby_1_8_only => true do
begin
@obj.erroring_delegated_method
rescue NoMethodError => err
err.message.should =~ /`erroring_delegated_method' for nil/
err.backtrace.first.should =~ /#{__FILE__}/