Handle CLI failure exit status at the top-level script (#28322)
This commit is contained in:
parent
881e8c113c
commit
0e0a94f483
27 changed files with 150 additions and 320 deletions
|
@ -22,8 +22,7 @@ describe Mastodon::CLI::Maintenance do
|
|||
|
||||
it 'Exits with error message' do
|
||||
expect { subject }
|
||||
.to output_results('is too old')
|
||||
.and raise_error(SystemExit)
|
||||
.to raise_error(Thor::Error, /is too old/)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -36,7 +35,7 @@ describe Mastodon::CLI::Maintenance do
|
|||
it 'Exits with error message' do
|
||||
expect { subject }
|
||||
.to output_results('more recent')
|
||||
.and raise_error(SystemExit)
|
||||
.and raise_error(Thor::Error, /more recent/)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -48,8 +47,7 @@ describe Mastodon::CLI::Maintenance do
|
|||
|
||||
it 'Exits with error message' do
|
||||
expect { subject }
|
||||
.to output_results('Sidekiq is running')
|
||||
.and raise_error(SystemExit)
|
||||
.to raise_error(Thor::Error, /Sidekiq is running/)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue