Sha256: 019c99d2b05711dae0e88ee2757cdf67607ba18e004b4f39cbf3c99e1d34aaa6

Contents?: true

Size: 551 Bytes

Versions: 2

Compression:

Stored size: 551 Bytes

Contents

# encoding: utf-8

require 'test/helper'

class Nanoc3::CLI::Commands::CreateSiteTest < MiniTest::Unit::TestCase

  include Nanoc3::TestHelpers

  def test_create_site_with_existing_name
    Nanoc3::CLI::Base.new.run([ 'create_site', 'foo' ])
    assert_raises(SystemExit) { Nanoc3::CLI::Base.new.run([ 'create_site', 'foo' ]) }
  end

  def test_can_compile_new_site
    Nanoc3::CLI::Base.new.run([ 'create_site', 'foo' ])

    FileUtils.cd('foo') do
      site = Nanoc3::Site.new('.')
      site.load_data
      site.compiler.run
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nanoc3-3.1.9 test/cli/commands/test_create_site.rb
nanoc3-3.1.8 test/cli/commands/test_create_site.rb