Skip to content

Commit

Permalink
Standardize on args_for_multiple_calls.
Browse files Browse the repository at this point in the history
It’s confusing to call it `args` when it’s a list
of received args for multiple calls (an array-of-arrays).
  • Loading branch information
myronmarston committed Apr 9, 2015
1 parent a1027d2 commit f40fce0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/rspec/mocks/error_generator.rb
Expand Up @@ -55,8 +55,8 @@ def raise_unexpected_message_args_error(expectation, args_for_multiple_calls)
end

# @private
def raise_missing_default_stub_error(expectation, args)
message = error_message(expectation, args)
def raise_missing_default_stub_error(expectation, args_for_multiple_calls)
message = error_message(expectation, args_for_multiple_calls)
message << "\n Please stub a default value first if message might be received with other args as well. \n"

__raise message
Expand Down
8 changes: 4 additions & 4 deletions lib/rspec/mocks/proxy.rb
Expand Up @@ -198,13 +198,13 @@ def raise_unexpected_message_error(method_name, args)
end

# @private
def raise_unexpected_message_args_error(expectation, args)
@error_generator.raise_unexpected_message_args_error(expectation, args)
def raise_unexpected_message_args_error(expectation, args_for_multiple_calls)
@error_generator.raise_unexpected_message_args_error(expectation, args_for_multiple_calls)
end

# @private
def raise_missing_default_stub_error(expectation, args)
@error_generator.raise_missing_default_stub_error(expectation, args)
def raise_missing_default_stub_error(expectation, args_for_multiple_calls)
@error_generator.raise_missing_default_stub_error(expectation, args_for_multiple_calls)
end

# @private
Expand Down

0 comments on commit f40fce0

Please sign in to comment.