Skip to content

Commit

Permalink
Fix format for splat args
Browse files Browse the repository at this point in the history
  • Loading branch information
iHiD committed Aug 18, 2019
1 parent 22b6354 commit d88564f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/analyzers/two_fer/analyze.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def check_structure!
# is sane and that it has valid arguments
def check_method_signature!
disapprove!(:missing_default_param) unless solution.has_one_parameter?
disapprove!(:splat_args, solution.first_parameter_name) if solution.uses_splat_args?
disapprove!(:splat_args, {name_variable: solution.first_parameter_name}) if solution.uses_splat_args?
disapprove!(:missing_default_param) unless solution.first_paramater_has_default_value?
end

Expand Down
2 changes: 1 addition & 1 deletion test/exercises/two_fer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def self.two_fer(*foos)
}
results = TwoFer::Analyze.(source)
assert_equal :disapprove, results[:status]
assert_equal [["ruby.two-fer.splat_args", :foos]], results[:comments]
assert_equal [["ruby.two-fer.splat_args", name_variable: :foos]], results[:comments]
end

# ### 
Expand Down

0 comments on commit d88564f

Please sign in to comment.