Skip to content

Commit

Permalink
* Add more test cases to cover more possible combinations
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Sep 23, 2024
1 parent b0eccc3 commit 02fc8ef
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,29 @@ Feature: KeywordArgs when used with optional positional arguments
["c", "d"]
output
"""

Scenario: Accepts arguments when only require arguments & optional keyword arguments filled and valid
Given a file named "accepts_all_filled_valid_args.rb" with:
"""ruby
require "./keyword_args_with_optional_positional_args_usage"
puts Example.new.foo(:output, b: 'd')
"""
When I run `ruby accepts_all_filled_valid_args.rb`
Then output should contain:
"""
["a", "d"]
output
"""

Scenario: Accepts arguments when only require arguments & optional positional arguments filled and valid
Given a file named "accepts_all_filled_valid_args.rb" with:
"""ruby
require "./keyword_args_with_optional_positional_args_usage"
puts Example.new.foo(:output, 'c')
"""
When I run `ruby accepts_all_filled_valid_args.rb`
Then output should contain:
"""
["c", "b"]
output
"""

0 comments on commit 02fc8ef

Please sign in to comment.