Class: Expect::ExpectationTarget Private
- Inherits:
- BasicObject
- Defined in:
- lib/expect/expectation_target.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wraps the target of an expectation.
Instance Method Summary collapse
-
#initialize(&actual) ⇒ ExpectationTarget
constructor
private
A new instance of ExpectationTarget.
-
#not_to(definition) ⇒ Object
Evaluate to a negative assertion.
-
#to(definition) ⇒ Object
Evaluate to a positive assertion.
Constructor Details
#initialize(&actual) ⇒ ExpectationTarget
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ExpectationTarget.
9 10 11 |
# File 'lib/expect/expectation_target.rb', line 9 def initialize(&actual) @actual = actual end |
Instance Method Details
#not_to(definition) ⇒ Object
Evaluate to a negative assertion.
27 28 29 |
# File 'lib/expect/expectation_target.rb', line 27 def not_to(definition) to(definition).equal?(false) end |