Sha256: 1eb4ed9c6cb24e3cc72216039309b41b0a835dca060a09f013a74750fcc48071

Contents?: true

Size: 978 Bytes

Versions: 13

Compression:

Stored size: 978 Bytes

Contents

require 'test_helper'

class COMPCTest < Test::Unit::TestCase
  include Sprout::TestHelper

  context "An COMPC tool" do

    setup do
      @fixture         = File.join 'test', 'fixtures', 'compc', 'simple'
      @input           = File.join @fixture, 'SomeFile.as'
      @expected_output = File.join @fixture, 'SomeFile.swc'
    end

    teardown do
      remove_file @expected_output
    end

    should "accept input" do
      as_a_unix_system do
        compc = FlashSDK::COMPC.new
        compc.output = @expected_output
        compc.include_sources << @fixture
        assert_equal '--output=test/fixtures/compc/simple/SomeFile.swc --static-link-runtime-shared-libraries --include-sources+=test/fixtures/compc/simple', compc.to_shell
      end
    end

    should "compile a swc" do
      compc = FlashSDK::COMPC.new
      compc.include_sources << @fixture
      compc.output = @expected_output
      compc.execute
      assert_file @expected_output
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
flashsdk-1.0.29.pre test/unit/compc_test.rb
flashsdk-1.0.28.pre test/unit/compc_test.rb
flashsdk-1.0.27.pre test/unit/compc_test.rb
flashsdk-1.0.26.pre test/unit/compc_test.rb
flashsdk-1.0.25.pre test/unit/compc_test.rb
flashsdk-1.0.23.pre test/unit/compc_test.rb
flashsdk-1.0.22.pre test/unit/compc_test.rb
flashsdk-1.0.21.pre test/unit/compc_test.rb
flashsdk-1.0.20.pre test/unit/compc_test.rb
flashsdk-1.0.18.pre test/unit/compc_test.rb
flashsdk-1.0.17.pre test/unit/compc_test.rb
flashsdk-1.0.15.pre test/unit/compc_test.rb
flashsdk-1.0.14.pre test/unit/compc_test.rb