Sha256: 0db9904e9365e1ffdbccee1d45f4e830d780bc4b9d79f5fd99e2dd4c8286b1e4
Contents?: true
Size: 852 Bytes
Versions: 23
Compression:
Stored size: 852 Bytes
Contents
module RSpec module Mocks module AnyInstance # @private class StubChain < Chain # @private def initialize(*args, &block) record(:stub, *args, &block) end # @private def expectation_fulfilled? true end private def invocation_order @invocation_order ||= { :stub => [nil], :with => [:stub], :and_return => [:with, :stub], :and_raise => [:with, :stub], :and_yield => [:with, :stub] } end def verify_invocation_order(rspec_method_name, *args, &block) unless invocation_order[rspec_method_name].include?(last_message) raise(NoMethodError, "Undefined method #{rspec_method_name}") end end end end end end
Version data entries
23 entries across 23 versions & 10 rubygems