Sha256: a36d497db88cdef8463cea340718a63fd4ffaa60b14e3de14d247553fd62b17b

Contents?: true

Size: 564 Bytes

Versions: 15

Compression:

Stored size: 564 Bytes

Contents

# encoding: utf-8

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

  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

15 entries across 15 versions & 1 rubygems

Version Path
nanoc-3.7.4 test/cli/commands/test_create_layout.rb
nanoc-3.7.3 test/cli/commands/test_create_layout.rb
nanoc-3.7.2 test/cli/commands/test_create_layout.rb
nanoc-3.7.1 test/cli/commands/test_create_layout.rb
nanoc-3.7.0 test/cli/commands/test_create_layout.rb
nanoc-3.6.11 test/cli/commands/test_create_layout.rb
nanoc-3.6.10 test/cli/commands/test_create_layout.rb
nanoc-3.6.9 test/cli/commands/test_create_layout.rb
nanoc-3.6.8 test/cli/commands/test_create_layout.rb
nanoc-3.6.7 test/cli/commands/test_create_layout.rb
nanoc-3.6.6 test/cli/commands/test_create_layout.rb
nanoc-3.6.5 test/cli/commands/test_create_layout.rb
nanoc-3.6.4 test/cli/commands/test_create_layout.rb
nanoc-3.6.3 test/cli/commands/test_create_layout.rb
nanoc-3.6.2 test/cli/commands/test_create_layout.rb