spec/sandbox/errors_spec.rb in ruby-virtualenv-0.5.0 vs spec/sandbox/errors_spec.rb in ruby-virtualenv-0.5.1

- old
+ new

@@ -1,10 +1,10 @@ require 'spec_helper' describe 'new', Sandbox::Error do it "should wrap it's message with 'Sandbox error'" do - Sandbox::Error.new( 'msg' ).message.should == 'Sandbox error: msg' + Sandbox::Error.new('msg').message.should == 'msg' end end describe 'new', Sandbox::LoadedSandboxError do it "should have informative default msg" do @@ -12,21 +12,17 @@ end end describe 'new', Sandbox::ParseError do it "should accept reason with array" do - Sandbox::ParseError.new( 'testing', [ 1, 2, 3, 4 ] ). - message.should =~ /testing => 1 2 3 4/ + Sandbox::ParseError.new('testing', [1, 2, 3, 4]).message.should =~ /testing => 1 2 3 4/ end it "should accept reason with string" do - Sandbox::ParseError.new( 'testing', "1, 2, 3, 4" ). - message.should =~ /testing => 1, 2, 3, 4/ + Sandbox::ParseError.new('testing', "1, 2, 3, 4").message.should =~ /testing => 1, 2, 3, 4/ end it "should fall back to reason alone" do - Sandbox::ParseError.new( 'testing', [] ). - message.should =~ /testing$/ - Sandbox::ParseError.new( 'testing', '' ). - message.should =~ /testing$/ + Sandbox::ParseError.new('testing', []).message.should =~ /testing$/ + Sandbox::ParseError.new('testing', '').message.should =~ /testing$/ end end