Sha256: 2ef3a5ee2686e5fa8001ce53bacc43725f430e2a2c7da4b4e382f5a90a9c36f5
Contents?: true
Size: 932 Bytes
Versions: 25
Compression:
Stored size: 932 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' require 'mspec/expectations/expectations' require 'mspec/matchers/be_false' describe BeFalseMatcher do it "matches when actual is false" do BeFalseMatcher.new.matches?(false).should == true end it "does not match when actual is not false" do BeFalseMatcher.new.matches?("").should == false BeFalseMatcher.new.matches?(true).should == false BeFalseMatcher.new.matches?(nil).should == false BeFalseMatcher.new.matches?(0).should == false end it "provides a useful failure message" do matcher = BeFalseMatcher.new matcher.matches?("some string") matcher.failure_message.should == ["Expected \"some string\"", "to be false"] end it "provides a useful negative failure message" do matcher = BeFalseMatcher.new matcher.matches?(false) matcher.negative_failure_message.should == ["Expected false", "not to be false"] end end
Version data entries
25 entries across 25 versions & 1 rubygems