Skip to content

Commit

Permalink
rename method to improve clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Oct 23, 2013
1 parent 0ada1b9 commit 9c5a718
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/rspec/mocks/matchers/have_received.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def generate_failure_message

def expected_messages_received_in_order?
mock_proxy.replay_received_message_on @expectation, &@block
@expectation.expected_messages_received? && @expectation.expected_ordering_received?
@expectation.expected_messages_received? && @expectation.ensure_expected_ordering_received!
end

def mock_proxy
Expand Down
5 changes: 3 additions & 2 deletions lib/rspec/mocks/message_expectation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,9 @@ def expected_messages_received?
ignoring_args? || matches_exact_count? || matches_at_least_count? || matches_at_most_count?
end

def expected_ordering_received?
!@ordered || @order_group.verify_invocation_order(self)
def ensure_expected_ordering_received!
@order_group.verify_invocation_order(self) if @ordered
true
end

# @private
Expand Down

0 comments on commit 9c5a718

Please sign in to comment.