Sha256: 244dab7946b93529edae17a0b95781895cb4a3d36356780f46b19b75f41b1508
Contents?: true
Size: 969 Bytes
Versions: 4
Compression:
Stored size: 969 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper.rb' context "should include(expected)" do specify "should pass if target includes expected" do [1,2,3].should include(3) "abc".should include("a") end specify "should fail if target does not include expected" do lambda { [1,2,3].should include(4) }.should fail_with("expected [1, 2, 3] to include 4") lambda { "abc".should include("d") }.should fail_with("expected \"abc\" to include \"d\"") end end context "should_not include(expected)" do specify "should pass if target does not include expected" do [1,2,3].should_not include(4) "abc".should_not include("d") end specify "should fail if target includes expected" do lambda { [1,2,3].should_not include(3) }.should fail_with("expected [1, 2, 3] not to include 3") lambda { "abc".should_not include("c") }.should fail_with("expected \"abc\" not to include \"c\"") end end
Version data entries
4 entries across 4 versions & 2 rubygems