Skip to content

Commit

Permalink
Rename available_parameters in PositionalOrKeywordHash
Browse files Browse the repository at this point in the history
To `actual_values` to make the code clearer.
  • Loading branch information
floehopper committed Jan 4, 2025
1 parent b37104b commit 16c7c51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/mocha/parameter_matchers/positional_or_keyword_hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def initialize(expected_value, expectation)
@expectation = expectation
end

def matches?(available_parameters)
parameter, is_last_parameter = extract_parameter(available_parameters)
def matches?(actual_values)
parameter, is_last_parameter = extract_parameter(actual_values)

return false unless HasEntries.new(@expected_value, exact: true).matches?([parameter])

Expand All @@ -37,8 +37,8 @@ def mocha_inspect

private

def extract_parameter(available_parameters)
[available_parameters.shift, available_parameters.empty?]
def extract_parameter(actual_values)
[actual_values.shift, actual_values.empty?]
end

def same_type_of_hash?(actual, expected)
Expand Down

0 comments on commit 16c7c51

Please sign in to comment.