Class: Spec::Matchers::Be
Overview
Instance Method Summary
collapse
Methods included from Pretty
#_pretty_print, #split_words, #to_sentence
Constructor Details
#initialize(*args, &block) ⇒ Be
Returns a new instance of Be.
35
36
37
|
# File 'lib/spec/matchers/be.rb', line 35
def initialize(*args, &block)
@args = args
end
|
Instance Method Details
#description ⇒ Object
52
53
54
|
# File 'lib/spec/matchers/be.rb', line 52
def description
"be"
end
|
#failure_message_for_should ⇒ Object
44
45
46
|
# File 'lib/spec/matchers/be.rb', line 44
def failure_message_for_should
"expected #{@actual.inspect} to evaluate to true"
end
|
#failure_message_for_should_not ⇒ Object
48
49
50
|
# File 'lib/spec/matchers/be.rb', line 48
def failure_message_for_should_not
"expected #{@actual.inspect} to evaluate to false"
end
|
#matches?(actual) ⇒ Boolean
39
40
41
42
|
# File 'lib/spec/matchers/be.rb', line 39
def matches?(actual)
@actual = actual
!!@actual
end
|