Sha256: 80d444a9384e64a76ddc52e15b1eb0d6a0a6a43f3437117be1927dbf6b8c27c8

Contents?: true

Size: 797 Bytes

Versions: 3

Compression:

Stored size: 797 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '../lib')
require 'test-unit'
require 'coffee-processing'

class TestCoffeeProcessing < Test::Unit::TestCase
  def test_indentation
    without_indentation = "
setup = ->
  null

draw = ->
  null"

    with_space_indentation = "
      setup = ->
        null

      draw = ->
        null
    "

    with_tab_indentation = "
			setup = ->
				null

			draw = ->
				null
		"

    assert_equal 1, 
      [without_indentation, with_space_indentation, with_tab_indentation].map { |code|
        CoffeeProcessing.compile 'this.sketch', code
      }.uniq.length
  end

  def test_error
    pend('Need to adjust line number (-8) in exception message') do
      CoffeeProcessing.compile 'this.sketch', '-> = ->'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
coffee-processing-0.0.3 test/test_coffee_processing.rb
coffee-processing-0.0.2 test/test_coffee_processing.rb
coffee-processing-0.0.1 test/test_coffee_processing.rb