Skip to content

Commit 3cd8b0b

Browse files
committed
fix(spec): include stricter expectations for invalid options
1 parent b833b59 commit 3cd8b0b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spec/command_spec.cr

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,13 @@ describe Cling::Command do
135135
end
136136

137137
it "fails on invalid options" do
138-
expect_raises Cling::CommandError do
138+
expect_raises Cling::ExecutionError, "Error while executing command error handler:\n\
139+
Option 'foo' takes no arguments" do
139140
options_command.execute "--foo=true --double-foo"
140141
end
141142

142-
expect_raises Cling::CommandError do
143+
expect_raises Cling::ExecutionError, "Error while executing command error handler:\n\
144+
Option 'double-foo' takes no arguments" do
143145
options_command.execute "--double-foo=true --bar baz"
144146
end
145147
end

0 commit comments

Comments
 (0)