Sha256: 04ef135cb7a9fb7a4404fcc6dd0220eb832a7344d195991b73b9d55bd780e001

Contents?: true

Size: 415 Bytes

Versions: 15

Compression:

Stored size: 415 Bytes

Contents

# encoding: utf-8

class Nanoc::Filters::CoffeeScriptTest < MiniTest::Unit::TestCase

  include Nanoc::TestHelpers

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

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

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
nanoc-3.5.0 test/filters/test_coffeescript.rb
nanoc-3.5.0b2 test/filters/test_coffeescript.rb
nanoc-3.5.0b1 test/filters/test_coffeescript.rb
nanoc-3.4.3 test/filters/test_coffeescript.rb
nanoc-3.4.2 test/filters/test_coffeescript.rb
nanoc-3.4.1 test/filters/test_coffeescript.rb
nanoc-3.4.0 test/filters/test_coffeescript.rb
nanoc-3.3.7 test/filters/test_coffeescript.rb
nanoc-3.3.6 test/filters/test_coffeescript.rb
nanoc-3.3.5 test/filters/test_coffeescript.rb
nanoc-3.3.4 test/filters/test_coffeescript.rb
nanoc-3.3.3 test/filters/test_coffeescript.rb
nanoc-3.3.2 test/filters/test_coffeescript.rb
nanoc-3.3.1 test/filters/test_coffeescript.rb
nanoc-3.3.0 test/filters/test_coffeescript.rb