Sha256: 362e13408e54dc2e9fa1b5490329f23ed32f9036bebf531dba29d97b2d218c70
Contents?: true
Size: 548 Bytes
Versions: 4
Compression:
Stored size: 548 Bytes
Contents
require File.dirname(__FILE__) + '/../../../spec_helper.rb' context "should_throw" do specify "should fail when no symbol is thrown" do lambda do lambda {}.should_throw(:foo) end.should_fail end specify "should fail when wrong symbol is thrown" do lambda do lambda do throw(:bar) end.should_throw(:foo) end.should_fail end specify "should pass when proper symbol is thrown" do lambda do lambda do throw(:foo) end.should_throw(:foo) end.should_not_raise end end
Version data entries
4 entries across 4 versions & 2 rubygems