vendor/gems/flexmock-0.8.5/lib/flexmock/expectation.rb
# Helper method for defining ordered expectations.
Helper method for defining ordered expectations.
Helper method for defining ordered expectations .
def define_ordered(group_name, ordering)
      fail UsageError, "Mock #{@mock.flexmock_name} is not in a container and cannot be globally ordered." if ordering.nil?
      if group_name.nil?
         result = ordering.flexmock_allocate_order
      elsif (num = ordering.flexmock_groups[group_name])
        result = num
      else
        result = ordering.flexmock_allocate_order
        ordering.flexmock_groups[group_name] = result
      end
      result
    end
def define_ordered ( group_name , ordering ) fail UsageError , "Mock #{@mock.flexmock_name} is not in a container and cannot be globally ordered." if ordering . nil? if group_name . nil? result = ordering . flexmock_allocate_order elsif ( num = ordering . flexmock_groups [ group_name ] ) result = num else result = ordering . flexmock_allocate_order ordering . flexmock_groups [ group_name ] = result end result end
Helper method for defining ordered expectations.
Helper method for defining ordered expectations .
group_name
ordering