Sha256: d10249621c52dfc0c2bc597683c9b46124e179aa01322a8d29471124e4b73c45
Contents?: true
Size: 1.42 KB
Versions: 15
Compression:
Stored size: 1.42 KB
Contents
module RSpec module Mocks module AnyInstance # @api private class ExpectationChain < Chain def expectation_fulfilled? @expectation_fulfilled || constrained_to_any_of?(:never, :any_number_of_times) end def initialize(*args, &block) record(*args, &block) @expectation_fulfilled = false end private def verify_invocation_order(rspec_method_name, *args, &block) end end # @api private class PositiveExpectationChain < ExpectationChain def initialize(*args, &block) super(:should_receive, *args, &block) end private def invocation_order @invocation_order ||= { :should_receive => [nil], :with => [:should_receive], :and_return => [:with, :should_receive], :and_raise => [:with, :should_receive] } end end # @api private class NegativeExpectationChain < ExpectationChain def initialize(*args, &block) super(:should_not_receive, *args, &block) end private def invocation_order @invocation_order ||= { :should_not_receive => [nil], :with => [:should_receive], :and_return => [:with, :should_receive], :and_raise => [:with, :should_receive] } end end end end end
Version data entries
15 entries across 15 versions & 6 rubygems