test/cli/commands/test_deploy.rb in nanoc-3.4.2 vs test/cli/commands/test_deploy.rb in nanoc-3.4.3

- old
+ new

@@ -105,22 +105,21 @@ end FileUtils.mkdir_p('output') File.open('output/blah.html', 'w') { |io| io.write 'moo' } - ios = capturing_stdio do - assert_raises SystemExit do + capturing_stdio do + err = assert_raises Nanoc::Errors::GenericTrivial do Nanoc::CLI.run %w( deploy ) end + assert_equal 'The site configuration has no deploy configuration for default.', err.message end - - assert ios[:stderr].include?('The site configuration has no deploy configuration for default.') end end end - def test_deploy_without_target_without_default + def test_deploy_without_target_with_default if_have 'systemu' do with_site do |site| File.open('config.yaml', 'w') do |io| io.write "deploy:\n" io.write " default:\n" @@ -128,10 +127,10 @@ end FileUtils.mkdir_p('output') File.open('output/blah.html', 'w') { |io| io.write 'moo' } - ios = capturing_stdio do + capturing_stdio do Nanoc::CLI.run %w( deploy ) end assert File.directory?('mydestination') assert File.file?('mydestination/blah.html')