blob: 52f50137525c0d2c506f69af3d3d20c611ad96a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
class BeTrueMatcher
def matches?(actual)
@actual = actual
@actual == true
end
def failure_message
["Expected #{@actual.inspect}", "to be true"]
end
def negative_failure_message
["Expected #{@actual.inspect}", "not to be true"]
end
end
module MSpecMatchers
private def be_true
BeTrueMatcher.new
end
end
|