Sha256: 0978dbd9c048a122ed15e730793510a14a55098c22996ee8fdd74c0659404011

Contents?: true

Size: 609 Bytes

Versions: 8

Compression:

Stored size: 609 Bytes

Contents

# encoding: utf-8

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

  include Nanoc3::TestHelpers

  def test_can_compile_new_layout
    require 'nanoc3/cli'

    Nanoc3::CLI.run %w( create_site foo )

    FileUtils.cd('foo') do
      # Create new layout
      Nanoc3::CLI.run %w( create_layout moo )

      # Makes rules use new layout
      rules_raw = File.read('Rules')
      File.open('Rules', 'w') do |io|
        io.write rules_raw.sub("layout 'default'", "layout 'moo'")
      end

      site = Nanoc3::Site.new('.')
      site.load_data
      site.compile
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
nanoc3-3.2.4 test/cli/commands/test_create_layout.rb
nanoc3-3.2.3 test/cli/commands/test_create_layout.rb
nanoc3-3.2.2 test/cli/commands/test_create_layout.rb
nanoc3-3.2.1 test/cli/commands/test_create_layout.rb
nanoc3-3.2.0 test/cli/commands/test_create_layout.rb
nanoc3-3.2.0b3 test/cli/commands/test_create_layout.rb
nanoc3-3.2.0b2 test/cli/commands/test_create_layout.rb
nanoc3-3.2.0b1 test/cli/commands/test_create_layout.rb