class FlexMock::RSpecMatchers::HaveReceived
Public Class Methods
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 9 def initialize(method_name) @method_name = method_name @args = nil @block = nil @times = nil @needs_block = nil @additional_validations = [] end
Public Instance Methods
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 81 def and(&block) @additional_validations << block self end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 86 def construct_options { :times => @times, :with_block => @needs_block, :on_count => @on_count, :and => @additional_validations, } end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 40 def description spy_description(@spy, @method_name, @args, @options) end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 28 def failure_message describe_spy_expectation(@spy, @method_name, @args, @options) end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 24 def failure_message_for_should failure_message end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 32 def failure_message_for_should_not failure_message_when_negated end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 36 def failure_message_when_negated describe_spy_negative_expectation(@spy, @method_name, @args, @options) end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 18 def matches?(spy) @spy = spy @options = construct_options @spy.flexmock_received?(@method_name, @args, @options) end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 76 def on(on_count) @on_count = on_count self end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 44 def with(*args) @args = args self end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 49 def with_a_block @needs_block = true self end
Source
# File lib/flexmock/rspec_spy_matcher.rb, line 54 def without_a_block @needs_block = false self end