Skip to content

Commit

Permalink
Only call value method if it has zero arity
Browse files Browse the repository at this point in the history
  • Loading branch information
ToriK17 committed Mar 2, 2022
1 parent d3892cc commit a6e0560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec_api_documentation/dsl/endpoint/set_param.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def method_name
custom_method_name if example_group.respond_to?(custom_method_name)
elsif scoped_key && example_group.respond_to?(scoped_key)
scoped_key
elsif key && example_group.respond_to?(key)
elsif key && example_group.respond_to?(key) && example_group.public_method(key).arity.zero?
key
elsif key && set_value
key
Expand Down

0 comments on commit a6e0560

Please sign in to comment.