Add shared example for CLI command specs (#28165)
This commit is contained in:
parent
92fa9b109f
commit
7753e5f715
17 changed files with 28 additions and 81 deletions
11
spec/support/examples/cli.rb
Normal file
11
spec/support/examples/cli.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
shared_examples 'CLI Command' do
|
||||
it 'configures Thor to exit on failure' do
|
||||
expect(described_class.exit_on_failure?).to be true
|
||||
end
|
||||
|
||||
it 'descends from the CLI base class' do
|
||||
expect(described_class.new).to be_a(Mastodon::CLI::Base)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue