Sha256: 8c27a4c4671b4297e066cdaf9cd55e7906d5e4d2b72b06c7317475c3bbc3c4f8

Contents?: true

Size: 386 Bytes

Versions: 14

Compression:

Stored size: 386 Bytes

Contents

# encoding: utf-8

class Nanoc::Filters::CoffeeScriptTest < Nanoc::TestCase

  def test_filter
    if_have 'coffee-script' do
      # Create filter
      filter = ::Nanoc::Filters::CoffeeScript.new

      # Run filter (no assigns)
      result = filter.setup_and_run('alert 42')
      assert_equal("(function() { alert(42); }).call(this); ", result.gsub(/\s+/, ' '))
    end
  end

end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
nanoc-3.7.3 test/filters/test_coffeescript.rb
nanoc-3.7.2 test/filters/test_coffeescript.rb
nanoc-3.7.1 test/filters/test_coffeescript.rb
nanoc-3.7.0 test/filters/test_coffeescript.rb
nanoc-3.6.11 test/filters/test_coffeescript.rb
nanoc-3.6.10 test/filters/test_coffeescript.rb
nanoc-3.6.9 test/filters/test_coffeescript.rb
nanoc-3.6.8 test/filters/test_coffeescript.rb
nanoc-3.6.7 test/filters/test_coffeescript.rb
nanoc-3.6.6 test/filters/test_coffeescript.rb
nanoc-3.6.5 test/filters/test_coffeescript.rb
nanoc-3.6.4 test/filters/test_coffeescript.rb
nanoc-3.6.3 test/filters/test_coffeescript.rb
nanoc-3.6.2 test/filters/test_coffeescript.rb