Implement dry run mode

This commit is contained in:
Thibault Jouan
2014-05-25 12:11:38 +00:00
parent 332bb1a416
commit 87a3ead082
8 changed files with 57 additions and 9 deletions

View File

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