Skip to content

Commit

Permalink
fix: catch SystemExit
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Jul 14, 2024
1 parent 873399e commit 5972c2e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/cli/rule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
let!(:path) { File.expand_path("../fixtures/rules/invalid_rule.yml", __dir__) }

it do
# TODO: assert UnwrapError
expect { described_class.new.invoke(:validate, [path]) }.to output(include(path)).to_stderr
expect do
expect { described_class.new.invoke(:validate, [path]) }.to output(include(path)).to_stderr
end.to raise_error(SystemExit) # ref. https://pocke.hatenablog.com/entry/2016/07/17/085928
end
end
end
Expand Down

0 comments on commit 5972c2e

Please sign in to comment.