Sha256: 15ed9cda408f7d379823d79100274f466fa7f1aa43a05b6f5aeddc7217928d28

Contents?: true

Size: 603 Bytes

Versions: 17

Compression:

Stored size: 603 Bytes

Contents

# encoding: utf-8

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

  include Nanoc::TestHelpers

  def test_can_compile_new_layout
    require 'nanoc/cli'

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

    FileUtils.cd('foo') do
      # Create new layout
      Nanoc::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 = Nanoc::Site.new('.')
      site.load_data
      site.compile
    end
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
nanoc-3.6.1 test/cli/commands/test_create_layout.rb
nanoc-3.6.0 test/cli/commands/test_create_layout.rb
nanoc-3.5.0 test/cli/commands/test_create_layout.rb
nanoc-3.5.0b2 test/cli/commands/test_create_layout.rb
nanoc-3.5.0b1 test/cli/commands/test_create_layout.rb
nanoc-3.4.3 test/cli/commands/test_create_layout.rb
nanoc-3.4.2 test/cli/commands/test_create_layout.rb
nanoc-3.4.1 test/cli/commands/test_create_layout.rb
nanoc-3.4.0 test/cli/commands/test_create_layout.rb
nanoc-3.3.7 test/cli/commands/test_create_layout.rb
nanoc-3.3.6 test/cli/commands/test_create_layout.rb
nanoc-3.3.5 test/cli/commands/test_create_layout.rb
nanoc-3.3.4 test/cli/commands/test_create_layout.rb
nanoc-3.3.3 test/cli/commands/test_create_layout.rb
nanoc-3.3.2 test/cli/commands/test_create_layout.rb
nanoc-3.3.1 test/cli/commands/test_create_layout.rb
nanoc-3.3.0 test/cli/commands/test_create_layout.rb