Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
at-grandpa committed Dec 25, 2018
1 parent 8258349 commit 1e11e4d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 37 deletions.
2 changes: 1 addition & 1 deletion spec/clim/dsl_spec/string_09_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ spec(
exception_message: "Option that requires an argument. \"--string\"",
},
{
argv:q ["--help"],
argv: ["--help"],
expect_help: {{main_help_message}},
},
{
Expand Down
36 changes: 0 additions & 36 deletions spec/clim/dsl_spec/sub_command_01_02_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -258,39 +258,3 @@ spec_for_sub_sub_commands(
]
)
{% end %}

macro spec_for_jump_over_sub_sub_command(spec_class_name, spec_cases)
{% for spec_case, index in spec_cases %}
{% class_name = (spec_class_name.stringify + index.stringify).id %}

# define dsl
class {{class_name}} < Clim
main_command do
run do |opts, args|
assert_opts_and_args({{spec_case}})
end
command "sub_command" do
run do |opts, args|
end
command "sub_sub_command" do
run do |opts, args|
assert_opts_and_args({{spec_case}})
end
end
end
command "jump_over_sub_sub_command" do
run do |opts, args|
assert_opts_and_args({{spec_case}})
end
end
end
end

# spec
describe "jump over sub_sub command," do
describe "if argv is " + {{spec_case["argv"].stringify}} + "," do
it_blocks({{class_name}}, {{spec_case}})
end
end
{% end %}
end

0 comments on commit 1e11e4d

Please sign in to comment.