Sha256: 4fccaff944d0c71da210fdf81448266c73e25273afd5ac2c3ebe31c96b43df43

Contents?: true

Size: 599 Bytes

Versions: 42

Compression:

Stored size: 599 Bytes

Contents

require 'hardmock/method_cleanout'
require 'hardmock/errors'

module Hardmock
  class Expector #:nodoc:
    include MethodCleanout

    def initialize(mock,mock_control,expectation_builder)
      @mock = mock
      @mock_control = mock_control
      @expectation_builder = expectation_builder
    end

    def method_missing(mname, *args, &block)
      expectation = @expectation_builder.build_expectation(
        :mock => @mock, 
        :method => mname, 
        :arguments => args, 
        :block => block)

      @mock_control.add_expectation expectation
      expectation
    end
  end

end

Version data entries

42 entries across 39 versions & 3 rubygems

Version Path
ceedling-0.31.1 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.31.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.30.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.28.3 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.28.2 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.28.1 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.27.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.25.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.24.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.22.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.21.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.20.3 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.20.2 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.19.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.18.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.17.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.16.0 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.15.6 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.15.5 vendor/hardmock/lib/hardmock/expector.rb
ceedling-0.15.4 vendor/hardmock/lib/hardmock/expector.rb