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
|
@ -6,6 +6,8 @@ require 'mastodon/cli/accounts'
|
|||
describe Mastodon::CLI::Accounts do
|
||||
let(:cli) { described_class.new }
|
||||
|
||||
it_behaves_like 'CLI Command'
|
||||
|
||||
# `parallelize_with_progress` cannot run in transactions, so instead,
|
||||
# stub it with an alternative implementation that runs sequentially
|
||||
# and can run in transactions.
|
||||
|
@ -24,12 +26,6 @@ describe Mastodon::CLI::Accounts do
|
|||
end
|
||||
end
|
||||
|
||||
describe '.exit_on_failure?' do
|
||||
it 'returns true' do
|
||||
expect(described_class.exit_on_failure?).to be true
|
||||
end
|
||||
end
|
||||
|
||||
describe '#create' do
|
||||
shared_examples 'a new user with given email address and username' do
|
||||
it 'creates a new user with the specified email address' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue