Sha256: 709c2dadde3e08dd85feccfb646331725a9efd1a7b4262b4c0eb8de5f0fc5a66

Contents?: true

Size: 875 Bytes

Versions: 9

Compression:

Stored size: 875 Bytes

Contents

# encoding: utf-8

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

  include Nanoc::TestHelpers

  def test_profiling_information
    with_site do |site|
      Nanoc::CLI.run %w( create_item foo )
      Nanoc::CLI.run %w( create_item bar )
      Nanoc::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

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

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
nanoc-3.4.0 test/cli/commands/test_compile.rb
nanoc-3.3.7 test/cli/commands/test_compile.rb
nanoc-3.3.6 test/cli/commands/test_compile.rb
nanoc-3.3.5 test/cli/commands/test_compile.rb
nanoc-3.3.4 test/cli/commands/test_compile.rb
nanoc-3.3.3 test/cli/commands/test_compile.rb
nanoc-3.3.2 test/cli/commands/test_compile.rb
nanoc-3.3.1 test/cli/commands/test_compile.rb
nanoc-3.3.0 test/cli/commands/test_compile.rb