Sha256: e0aec3b670e580fc19f5cd4bd5fc1121995c731f9f9ed987a53bbb271c8c2ba8

Contents?: true

Size: 881 Bytes

Versions: 8

Compression:

Stored size: 881 Bytes

Contents

# encoding: utf-8

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

  include Nanoc3::TestHelpers

  def test_profiling_information
    with_site do |site|
      Nanoc3::CLI.run %w( create_item foo )
      Nanoc3::CLI.run %w( create_item bar )
      Nanoc3::CLI.run %w( create_item baz )

      File.open('Rules', 'w') do |io|
        io.write "compile '*' do\n"
        io.write "  filter :erb\n"
        io.write "end\n"
        io.write "\n"
        io.write "route '*' do\n"
        io.write "  if item.binary?\n"
        io.write "    item.identifier.chop + '.' + item[:extension]\n"
        io.write "  else\n"
        io.write "    item.identifier + 'index.html'\n"
        io.write "  end\n"
        io.write "end\n"
        io.write "\n"
        io.write "layout '*', :erb\n"
      end

      Nanoc3::CLI.run %w( compile --verbose )
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

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