test/extra/test_auto_compiler.rb in nanoc3-3.2.0a4 vs test/extra/test_auto_compiler.rb in nanoc3-3.2.0b1

- old
+ new

@@ -1,17 +1,15 @@ # encoding: utf-8 -require 'test/helper' - class Nanoc3::Extra::AutoCompilerTest < MiniTest::Unit::TestCase include Nanoc3::TestHelpers def test_handle_request_with_item_rep_with_index_filename if_have 'mime/types', 'rack' do # Create site - Nanoc3::CLI::Base.new.run([ 'create_site', 'bar' ]) + Nanoc3::CLI.run %w( create_site bar) FileUtils.cd('bar') do # Create item FileUtils.mkdir_p('content/foo') File.open('content/foo/index.html', 'w') do |io| @@ -47,11 +45,11 @@ end def test_handle_request_with_broken_url if_have 'mime/types', 'rack' do # Create site - Nanoc3::CLI::Base.new.run([ 'create_site', 'bar' ]) + Nanoc3::CLI.run %w( create_site bar) FileUtils.cd('bar') do # Create site site = Nanoc3::Site.new('.') @@ -291,11 +289,11 @@ end def test_serve_with_working_item if_have 'mime/types', 'rack' do # Create site - Nanoc3::CLI::Base.new.run([ 'create_site', 'bar' ]) + Nanoc3::CLI.run %w( create_site bar) FileUtils.cd('bar') do # Create item File.open('content/index.html', 'w') do |io| io.write "Moo!" @@ -329,11 +327,11 @@ end def test_serve_with_broken_item if_have 'mime/types', 'rack' do # Create site - Nanoc3::CLI::Base.new.run([ 'create_site', 'bar' ]) + Nanoc3::CLI.run %w( create_site bar) FileUtils.cd('bar') do # Create item File.open('content/whatever.html', 'w') do |io| io.write "Whatever!" @@ -357,10 +355,10 @@ end def test_reload_config_file_before_each_request if_have 'rack' do # Create site - Nanoc3::CLI::Base.new.run([ 'create_site', 'foo' ]) + Nanoc3::CLI.run %w( create_site foo ) FileUtils.cd('foo') do # Create item that outputs config elements File.open('content/index.html', 'w') do |io| io.write "The Grand Value of Configuration is <%= @config[:value] %>!"