Sha256: fa2d6a5649fe909c95dc2112cb2aafa341bc42e2c21ba30ce47128b8a80e1281
Contents?: true
Size: 875 Bytes
Versions: 1
Compression:
Stored size: 875 Bytes
Contents
require 'spec_helper' describe 'new', Sandbox::Error do it "should wrap it's message with 'Sandbox error'" do Sandbox::Error.new('msg').message.should == 'msg' end end describe 'new', Sandbox::LoadedSandboxError do it "should have informative default msg" do Sandbox::LoadedSandboxError.new.message.should =~ /loaded sandbox/ 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/ end it "should accept reason with string" do 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$/ end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-virtualenv-0.5.1 | spec/sandbox/errors_spec.rb |