Sha256: 97dcdc61ba1dcc8ace381d2cc3b144c38905aa7cc79b6025f45476c88a53b3fb

Contents?: true

Size: 792 Bytes

Versions: 4

Compression:

Stored size: 792 Bytes

Contents

require 'test_helper'

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

  context "A new test class generator" do

    setup do
      @temp             = File.join(fixtures, 'generators', 'tmp')
      FileUtils.mkdir_p @temp
      @generator        = FlexUnit4::RunnerGenerator.new
      @generator.path   = @temp
      @generator.logger = StringIO.new
    end

    teardown do
      remove_file @temp
    end

    should "generate test runner" do
      @generator.input = "FastFeet"
      @generator.execute

      runner_file = File.join(@temp, "FastFeet.mxml")

      assert_file runner_file do |content|
        assert_matches /private var core:FlexUnitCore\b/, content
        assert_matches /core\.run\(AllTests\)/, content
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flexunit-0.0.9.pre test/unit/runner_generator_test.rb
flexunit-0.0.8.pre test/unit/runner_generator_test.rb
flexunit-0.0.7.pre test/unit/runner_generator_test.rb
flexunit-0.0.6.pre test/unit/runner_generator_test.rb