Implement dry run mode
This commit is contained in:
@@ -18,6 +18,10 @@ module Producer::Core
|
||||
expect(env.registry).to be_empty
|
||||
end
|
||||
|
||||
it 'assigns dry run as false' do
|
||||
expect(env.dry_run).to be false
|
||||
end
|
||||
|
||||
context 'when output is not given as argument' do
|
||||
subject(:env) { Env.new }
|
||||
|
||||
@@ -133,5 +137,13 @@ module Producer::Core
|
||||
expect(env.logger.level).to eq Logger::DEBUG
|
||||
end
|
||||
end
|
||||
|
||||
describe '#dry_run?' do
|
||||
before { env.dry_run = true }
|
||||
|
||||
it 'returns true when dry run is enabled' do
|
||||
expect(env.dry_run?).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user