File: stub_chain_chain.rb

package info (click to toggle)
ruby-rspec-mocks 2.14.5-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 868 kB
  • ctags: 725
  • sloc: ruby: 8,227; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module RSpec
  module Mocks
    module AnyInstance
      # @private
      class StubChainChain < StubChain

        private

        def create_message_expectation_on(instance)
          ::RSpec::Mocks::StubChain.stub_chain_on(instance, *@expectation_args, &@expectation_block)
        end

        def invocation_order
          @invocation_order ||= {
            :and_return => [nil],
            :and_raise => [nil],
            :and_yield => [nil]
          }
        end
      end
    end
  end
end