Class: CabezaDeTermo::JsonSpec::NegatedExpectation
- Inherits:
-
Expectation
- Object
- AbstractExpectation
- Expectation
- CabezaDeTermo::JsonSpec::NegatedExpectation
- Defined in:
- lib/cabeza-de-termo/json-spec/expectations/negated-expectation.rb
Instance Method Summary collapse
-
#explain ⇒ Object
Explaining.
- #failed_message_on(value_holder) ⇒ Object
-
#initialize(expectation) ⇒ NegatedExpectation
constructor
A new instance of NegatedExpectation.
- #is_satisfied_by?(value_holder) ⇒ Boolean
- #negated_expectation ⇒ Object
Methods inherited from Expectation
#accept_walker, #expectation_method, #explain_parameters, #failed_message_block, #json_spec, #set_expectation_method, #set_json_spec
Methods inherited from AbstractExpectation
#accept_walker, #set_expectation_method, #set_json_spec
Constructor Details
#initialize(expectation) ⇒ NegatedExpectation
Returns a new instance of NegatedExpectation.
6 7 8 9 10 |
# File 'lib/cabeza-de-termo/json-spec/expectations/negated-expectation.rb', line 6 def initialize(expectation) super() @negated_expectation = expectation end |
Instance Method Details
#explain ⇒ Object
Explaining
26 27 28 |
# File 'lib/cabeza-de-termo/json-spec/expectations/negated-expectation.rb', line 26 def explain() expectation_method.to_s + negated_expectation.explain_parameters end |
#failed_message_on(value_holder) ⇒ Object
20 21 22 |
# File 'lib/cabeza-de-termo/json-spec/expectations/negated-expectation.rb', line 20 def (value_holder) .(negated_expectation, value_holder) end |
#is_satisfied_by?(value_holder) ⇒ Boolean
16 17 18 |
# File 'lib/cabeza-de-termo/json-spec/expectations/negated-expectation.rb', line 16 def is_satisfied_by?(value_holder) !negated_expectation.is_satisfied_by?(value_holder) end |
#negated_expectation ⇒ Object
12 13 14 |
# File 'lib/cabeza-de-termo/json-spec/expectations/negated-expectation.rb', line 12 def negated_expectation() @negated_expectation end |