Module: FlexMock::Ordering

### Home Classes Methods

### In Files

- lib/flexmock/deprecated_methods.rb
- lib/flexmock/ordering.rb

### Methods

- #flexmock_allocate_order
- #flexmock_current_order
- #flexmock_current_order=
- #flexmock_groups
- #flexmock_validate_order

### 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::CallValidator
- FlexMock::CompositeExpectation
- FlexMock::CountValidator
- FlexMock::DefaultFrameworkAdapter
- FlexMock::DefaultFrameworkAdapter::AssertionFailedError
- FlexMock::DuckMatcher
- FlexMock::EqualMatcher
- FlexMock::ExactCountValidator
- FlexMock::Expectation
- FlexMock::ExpectationBuilder
- FlexMock::ExpectationDirector
- FlexMock::ExpectationRecorder
- FlexMock::ExplicitNeeded
- FlexMock::ExtensionRegistry
- FlexMock::Extensions
- FlexMock::Extensions::ActiveRecordModel
- FlexMock::GenericTestCase
- FlexMock::HashMatcher
- FlexMock::MockBuilder
- FlexMock::MockContainer
- 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::Ordering

The ordering module contains the methods and data structures used to determine proper orderring of mocked calls. By providing the functionality in a module, a individual mock object can order its own calls, and the container can provide ordering at a global level.

### Public Instance Methods

flexmock_allocate_order() click to toggle source

Allocate the next available order number.

    # File lib/flexmock/ordering.rb, line 22
    def flexmock_allocate_order
      @flexmock_allocated_order ||= 0
      @flexmock_allocated_order += 1
    end

flexmock_current_order() click to toggle source

Current order number in this ordering.

    # File lib/flexmock/ordering.rb, line 33
    def flexmock_current_order
      @flexmock_current_order ||= 0
    end

flexmock_current_order=(value) click to toggle source

Set the current order for this ordering.

    # File lib/flexmock/ordering.rb, line 38
    def flexmock_current_order=(value)
      @flexmock_current_order = value
    end

flexmock_groups() click to toggle source

Hash of groups defined in this ordering.

    # File lib/flexmock/ordering.rb, line 28
    def flexmock_groups
      @flexmock_groups ||= {}
    end

flexmock_validate_order(method_name, order_number) click to toggle source

    # File lib/flexmock/ordering.rb, line 42
    def flexmock_validate_order(method_name, order_number)
      FlexMock.check("method #{method_name} called out of order " +
        "(expected order #{order_number}, was #{flexmock_current_order})") {
        order_number >= self.flexmock_current_order
      }
      self.flexmock_current_order = order_number
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.