Module: FlexMock::ArgumentTypes

### Home Classes Methods

### In Files

- lib/flexmock/argument_types.rb

### Methods

- #any
- #ducktype
- #eq
- #hsh
- #on
- #optional_proc

### Files

- CHANGES
- GoogleExample.rdoc
- rspec_examples_spec.rdoc
- test_unit_examples_test.rdoc
- index.rdoc
- flexmock-0.4.0.rdoc
- flexmock-0.4.1.rdoc
- flexmock-0.4.2.rdoc
- flexmock-0.4.3.rdoc
- flexmock-0.5.0.rdoc
- flexmock-0.5.1.rdoc
- flexmock-0.6.0.rdoc
- flexmock-0.6.1.rdoc
- flexmock-0.6.2.rdoc
- flexmock-0.6.3.rdoc
- flexmock-0.6.4.rdoc
- flexmock-0.7.0.rdoc
- flexmock-0.7.1.rdoc
- flexmock-0.8.0.rdoc
- flexmock-0.8.2.rdoc
- flexmock-0.8.3.rdoc
- flexmock-0.8.4.rdoc
- flexmock-0.8.5.rdoc
- flexmock-0.9.0.rdoc
- flexmock-1.0.0.rdoc
- flexmock-1.0.3.rdoc
- flexmock-1.0.4.rdoc
- flexmock-1.1.0.rdoc
- flexmock-1.2.0.rdoc
- flexmock-1.3.0.rdoc
- flexmock-1.3.1.rdoc

### Class/Module Index

Quicksearch

- FlexMock
- FlexMock::AnyMatcher
- FlexMock::ArgumentMatching
- FlexMock::ArgumentTypes
- FlexMock::AtLeastCountValidator
- FlexMock::AtMostCountValidator
- FlexMock::CompositeExpectation
- FlexMock::CountValidator
- FlexMock::DefaultFrameworkAdapter
- FlexMock::DefaultFrameworkAdapter::AssertionFailedError
- FlexMock::DuckMatcher
- FlexMock::EqualMatcher
- FlexMock::ExactCountValidator
- FlexMock::Expectation
- FlexMock::ExpectationDirector
- FlexMock::ExpectationRecorder
- FlexMock::ExplicitNeeded
- FlexMock::GenericTestCase
- FlexMock::HashMatcher
- FlexMock::MockContainer
- FlexMock::MockContainerHelper
- FlexMock::MockError
- FlexMock::OptionalProcMatcher
- FlexMock::Ordering
- FlexMock::PartialMockProxy
- FlexMock::ProcMatcher
- FlexMock::RSpecFrameworkAdapter
- FlexMock::RSpecFrameworkAdapter::AssertionFailedError
- FlexMock::RSpecMatchers
- FlexMock::RSpecMatchers::HaveReceived
- FlexMock::Recorder
- FlexMock::SpyDescribers
- FlexMock::TestCase
- FlexMock::TestUnitAssertions
- FlexMock::TestUnitFrameworkAdapter
- FlexMock::Undefined
- FlexMock::UsageError
- FlexMock::UseContainer
- FlexMock::Version
- MiniTest
- MiniTest::Unit
- MiniTest::Unit::TestCase
- Test
- Test::Unit
- Test::Unit::TestCase
- Class
- Module
- Object
- Symbol

No matching classes.

# FlexMock::ArgumentTypes

Include this module in your test class if you wish to use the `eq` and `any` argument matching methods without a prefix. (Otherwise use `FlexMock.any` and `FlexMock.eq(obj)`.

### Public Instance Methods

any() click to toggle source

Return an argument matcher that matches any argument.

    # File lib/flexmock/argument_types.rb, line 23
    def any
      ANY
    end

ducktype(*methods) click to toggle source

Return an argument matcher that matches any object that implementes (i.e. responds to) the given method list.

    # File lib/flexmock/argument_types.rb, line 48
    def ducktype(*methods)
      DuckMatcher.new(methods)
    end

eq(obj) click to toggle source

Return an argument matcher that only matches things equal to (==) the given object.

    # File lib/flexmock/argument_types.rb, line 29
    def eq(obj)
      EqualMatcher.new(obj)
    end

hsh(hash) click to toggle source

Return an argument matcher that matches a hash with the given entries.

    # File lib/flexmock/argument_types.rb, line 42
    def hsh(hash)
      HashMatcher.new(hash)
    end

on(&block) click to toggle source

Return an argument matcher that matches any object, that when passed to the supplied block, will cause the block to return true.

    # File lib/flexmock/argument_types.rb, line 36
    def on(&block)
      ProcMatcher.new(&block)
    end

optional_proc() click to toggle source

    # File lib/flexmock/argument_types.rb, line 52
    def optional_proc
      OPTIONAL_PROC_MATCHER
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.