spec/configliere/param_spec.rb in configliere-0.0.1 vs spec/configliere/param_spec.rb in configliere-0.0.2
- old
+ new
@@ -33,10 +33,11 @@
@config['moon.man'].should == :smiling
@config['moon.cheese.type'].should == :tilsit
@config['moon.cheese.smell'].should be_nil
@config['moon.non.existent.interim.values'].should be_nil
@config['moon.non'].should be_nil
- lambda{ @config['hat.cat'] }.should raise_error(NoMethodError, 'undefined method `[]\' for :cat:Symbol')
+ if (RUBY_VERSION >= '1.9') then lambda{ @config['hat.cat'] }.should raise_error(TypeError)
+ else lambda{ @config['hat.cat'] }.should raise_error(NoMethodError, 'undefined method `[]\' for :cat:Symbol') end
@config.should == hsh # shouldn't change from reading
end
end
end