Class: Facon::NegativeExpectation

Inherits:
Expectation show all
Defined in:
lib/facon/expectation.rb

Instance Attribute Summary

Attributes inherited from Expectation

#actual_received_count, #argument_expectation, #error_generator, #expectation_ordering, #expected_from, #expected_received_count, #method, #method_block

Instance Method Summary collapse

Methods inherited from Expectation

#and_raise, #and_return, #and_throw, #and_yield, #invoke, #matches, #matches_name_but_not_args, #met?, #never, #once, #times, #with

Constructor Details

#initialize(error_generator, expectation_ordering, expected_from, method, method_block, expected_received_count = 0) ⇒ NegativeExpectation

Returns a new instance of NegativeExpectation.



131
132
133
# File 'lib/facon/expectation.rb', line 131

def initialize(error_generator, expectation_ordering, expected_from, method, method_block, expected_received_count = 0)
  super(error_generator, expectation_ordering, expected_from, method, method_block, expected_received_count)
end

Instance Method Details

#negative_expectation_for?(method) ⇒ Boolean

Returns:

  • (Boolean)


135
136
137
# File 'lib/facon/expectation.rb', line 135

def negative_expectation_for?(method)
  @method == method
end