test/test_parser.rb in cri-2.15.10 vs test/test_parser.rb in cri-2.15.11

- old
+ new

@@ -441,11 +441,11 @@ def test_parse_with_param_defns input = %w[localhost] param_defns = [ { name: 'host', transform: nil }, - ].map { |hash| Cri::ParamDefinition.new(hash) } + ].map { |hash| Cri::ParamDefinition.new(**hash) } parser = Cri::Parser.new(input, [], param_defns, false).run assert_equal({}, parser.options) assert_equal('localhost', parser.gen_argument_list[0]) assert_equal('localhost', parser.gen_argument_list[:host]) @@ -453,11 +453,11 @@ def test_parse_with_param_defns_too_few_args input = [] param_defns = [ { name: 'host', transform: nil }, - ].map { |hash| Cri::ParamDefinition.new(hash) } + ].map { |hash| Cri::ParamDefinition.new(**hash) } parser = Cri::Parser.new(input, [], param_defns, false).run exception = assert_raises(Cri::ArgumentList::ArgumentCountMismatchError) do parser.gen_argument_list end @@ -466,11 +466,11 @@ def test_parse_with_param_defns_too_many_args input = %w[localhost oink] param_defns = [ { name: 'host', transform: nil }, - ].map { |hash| Cri::ParamDefinition.new(hash) } + ].map { |hash| Cri::ParamDefinition.new(**hash) } parser = Cri::Parser.new(input, [], param_defns, false).run exception = assert_raises(Cri::ArgumentList::ArgumentCountMismatchError) do parser.gen_argument_list end @@ -479,11 +479,11 @@ def test_parse_with_param_defns_invalid_key input = %w[localhost] param_defns = [ { name: 'host', transform: nil }, - ].map { |hash| Cri::ParamDefinition.new(hash) } + ].map { |hash| Cri::ParamDefinition.new(**hash) } parser = Cri::Parser.new(input, [], param_defns, false).run exception = assert_raises(ArgumentError) do parser.gen_argument_list['oink'] @@ -494,10 +494,10 @@ def test_parse_with_param_defns_two_params input = %w[localhost example.com] param_defns = [ { name: 'source', transform: nil }, { name: 'target', transform: nil }, - ].map { |hash| Cri::ParamDefinition.new(hash) } + ].map { |hash| Cri::ParamDefinition.new(**hash) } parser = Cri::Parser.new(input, [], param_defns, false).run assert_equal({}, parser.options) assert_equal('localhost', parser.gen_argument_list[0]) assert_equal('localhost', parser.gen_argument_list[:source])