Class: RSpec::Matchers::Be
- Inherits:
-
Object
- Object
- RSpec::Matchers::Be
show all
- Includes:
- Pretty
- Defined in:
- lib/rspec/matchers/be.rb
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.
36
37
38
|
# File 'lib/rspec/matchers/be.rb', line 36
def initialize(*args, &block)
@args = args
end
|
Instance Method Details
#description ⇒ Object
53
54
55
|
# File 'lib/rspec/matchers/be.rb', line 53
def description
"be"
end
|
#failure_message_for_should ⇒ Object
45
46
47
|
# File 'lib/rspec/matchers/be.rb', line 45
def failure_message_for_should
"expected #{@actual.inspect} to evaluate to true"
end
|
#failure_message_for_should_not ⇒ Object
49
50
51
|
# File 'lib/rspec/matchers/be.rb', line 49
def failure_message_for_should_not
"expected #{@actual.inspect} to evaluate to false"
end
|
#matches?(actual) ⇒ Boolean
40
41
42
43
|
# File 'lib/rspec/matchers/be.rb', line 40
def matches?(actual)
@actual = actual
!!@actual
end
|