Sha256: d50ef168298ea503b150b52459634fa29469777adce0c9f49813d68f344bdb0e

Contents?: true

Size: 681 Bytes

Versions: 28

Compression:

Stored size: 681 Bytes

Contents

require 'test_helper'

class CompilerTest < Test::Unit::TestCase

  def setup
    @compiler = Golf::Compiler.new(File.expand_path("../twitter_compiled", __FILE__))
  end


  def test_componentsjs_generation
    componentjs = @compiler.generate_componentsjs
    known_good = File.read(File.expand_path("../twitter_compiled/golfapp/components.js", __FILE__))
    assert_equal componentjs.gsub(' ','').gsub('\n','').gsub('\\',''), known_good.gsub(' ','').gsub('\n','').gsub('\\','')
  end


  def test_package_name_resolution
    result = @compiler.package_name '/asd/asdasd/golfapp/components/golf/twitter/Tweet/Tweet.html'
    assert_equal 'golf.twitter.Tweet', result

  end


end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
golf-0.4.12 test/test_compiler.rb
golf-0.4.11 test/test_compiler.rb
golf-0.4.10 test/test_compiler.rb
golf-0.4.9 test/test_compiler.rb
golf-0.4.8 test/test_compiler.rb
golf-0.4.7 test/test_compiler.rb
golf-0.4.6 test/test_compiler.rb
golf-0.4.5 test/test_compiler.rb
golf-0.4.4 test/test_compiler.rb
golf-0.4.3 test/test_compiler.rb
golf-0.4.2 test/test_compiler.rb
golf-0.4.1 test/test_compiler.rb
golf-0.4.0 test/test_compiler.rb
golf-0.3.9 test/test_compiler.rb
golf-0.3.8 test/test_compiler.rb
golf-0.3.7 test/test_compiler.rb
golf-0.3.6 test/test_compiler.rb
golf-0.3.5 test/test_compiler.rb
golf-0.3.4 test/test_compiler.rb
golf-0.3.3 test/test_compiler.rb