Sha256: 90d607456fb2a61e997b64befd7186116ab817325478a61a68f49565280373e5

Contents?: true

Size: 1.08 KB

Versions: 24

Compression:

Stored size: 1.08 KB

Contents

require "minitest/autorun"
require "hoe"

Hoe.load_plugins # make sure Hoe::Test is loaded

class TestHoeTest < MiniTest::Unit::TestCase
  def setup
    @tester = Module.new do
      include Hoe::Test

      extend self

      initialize_test

      def test_globs
        ['test/test_hoe_test.rb']
      end
    end
  end

  def test_make_test_cmd_with_different_testlibs
    skip "Using TESTOPTS... skipping" if ENV['TESTOPTS']

    expected = ['-w -Ilib:bin:test:. -e \'require "rubygems"; %s',
                'require "test/test_hoe_test.rb"',
                "' -- ",
               ].join

    testunit = %(require "test/unit"; )
    assert_equal expected % testunit, @tester.make_test_cmd

    @tester.testlib = :minitest
    autorun = %(require "minitest/autorun"; )
    assert_equal expected % autorun, @tester.make_test_cmd

    @tester.testlib = :none
    assert_equal expected % "", @tester.make_test_cmd

    @tester.testlib = :faketestlib
    e = assert_raises(RuntimeError) do
      @tester.make_test_cmd
    end

    assert_equal "unsupported test framework faketestlib", e.to_s
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
hoe-3.6.1 test/test_hoe_test.rb
hoe-3.6.0 test/test_hoe_test.rb
hoe-3.5.3 test/test_hoe_test.rb
hoe-3.5.2 test/test_hoe_test.rb
hoe-3.5.1 test/test_hoe_test.rb
hoe-3.5.0 test/test_hoe_test.rb
hoe-3.4.1 test/test_hoe_test.rb
hoe-3.4.0 test/test_hoe_test.rb
hoe-3.3.1 test/test_hoe_test.rb
hoe-3.3.0 test/test_hoe_test.rb
hoe-3.2.0 test/test_hoe_test.rb
hoe-3.1.1 test/test_hoe_test.rb
hoe-3.1.0 test/test_hoe_test.rb
hoe-3.0.8 test/test_hoe_test.rb
hoe-3.0.7 test/test_hoe_test.rb
hoe-3.0.6 test/test_hoe_test.rb
hoe-3.0.5 test/test_hoe_test.rb
hoe-3.0.4 test/test_hoe_test.rb
hoe-3.0.3 test/test_hoe_test.rb
hoe-3.0.2 test/test_hoe_test.rb