blob: 3edffcb1b19ce6a5b35161661f85240adfae4c31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
require 'spec_helper'
require 'mspec/expectations/expectations'
require 'mspec/matchers'
describe BeTrueOrFalseMatcher do
it "matches when actual is true" do
BeTrueOrFalseMatcher.new.matches?(true).should == true
end
it "matches when actual is false" do
BeTrueOrFalseMatcher.new.matches?(false).should == true
end
it "provides a useful failure message" do
matcher = BeTrueOrFalseMatcher.new
matcher.matches?("some string")
matcher.failure_message.should == ["Expected \"some string\"", "to be true or false"]
end
end
|