0
0
Fork 0

Add shared example for CLI command specs (#28165)

This commit is contained in:
Matt Jankowski 2023-12-01 07:00:34 -05:00 committed by GitHub
parent 92fa9b109f
commit 7753e5f715
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 28 additions and 81 deletions

View file

@ -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