Re-enable spec/library for full CI runs.
[rbx.git] / mspec / spec / matchers / be_false_spec.rb
blob8235b5d784bbe948f75b632f279b7dd781641293
1 require File.dirname(__FILE__) + '/../spec_helper'
2 require 'mspec/expectations/expectations'
3 require 'mspec/matchers/be_false'
5 describe BeFalseMatcher do
6   it "matches when actual is false" do
7     BeFalseMatcher.new.matches?(false).should == true
8   end
10   it "does not match when actual is not false" do
11     BeFalseMatcher.new.matches?("").should == false
12     BeFalseMatcher.new.matches?(true).should == false
13     BeFalseMatcher.new.matches?(nil).should == false
14     BeFalseMatcher.new.matches?(0).should == false
15   end
17   it "provides a useful failure message" do
18     matcher = BeFalseMatcher.new
19     matcher.matches?("some string")
20     matcher.failure_message.should == ["Expected \"some string\"", "to be false"]
21   end
23   it "provides a useful negative failure message" do
24     matcher = BeFalseMatcher.new
25     matcher.matches?(false)
26     matcher.negative_failure_message.should == ["Expected false", "not to be false"]
27   end
28 end