Sha256: c147a8d126e9d34c7540673c7533062f4327e26fc25a951eb7e915c6ecf2d176

Contents?: true

Size: 1.09 KB

Versions: 13

Compression:

Stored size: 1.09 KB

Contents

require 'helper'

class TestCommandGuesser < Test::Unit::TestCase
  def self.should_guess_command_name(expectation, *argv)
    argv.each do |args|
      should "return '#{expectation}' for '#{args}'" do
        SimpleCov::CommandGuesser.original_run_command = args
        assert_equal expectation, SimpleCov::CommandGuesser.guess
      end
    end
  end

  should_guess_command_name "Unit Tests", '/some/path/test/units/foo_bar_test.rb', 'test/units/foo.rb', 'test/foo.rb', 'test/{models,helpers,unit}/**/*_test.rb'
  should_guess_command_name "Functional Tests", '/some/path/test/functional/foo_bar_controller_test.rb', 'test/{controllers,mailers,functional}/**/*_test.rb'
  should_guess_command_name "Integration Tests", '/some/path/test/integration/foo_bar_controller_test.rb', 'test/integration/**/*_test.rb'
  should_guess_command_name "Cucumber Features", 'features', 'cucumber', 'cucumber features'
  should_guess_command_name "RSpec", '/some/path/spec/foo.rb'
  should_guess_command_name "Unit Tests", 'some_arbitrary_command with arguments' # Because Test::Unit const is defined!
end if SimpleCov.usable?

Version data entries

13 entries across 8 versions & 3 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/simplecov-0.9.0/test/test_command_guesser.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/simplecov-0.9.0/test/test_command_guesser.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/simplecov-0.9.0/test/test_command_guesser.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/simplecov-0.8.2/test/test_command_guesser.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/simplecov-0.8.2/test/test_command_guesser.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/simplecov-0.8.2/test/test_command_guesser.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/simplecov-0.8.2/test/test_command_guesser.rb
simplecov-0.9.1 test/test_command_guesser.rb
simplecov-0.9.0 test/test_command_guesser.rb
simplecov-0.8.2 test/test_command_guesser.rb
simplecov-0.8.1 test/test_command_guesser.rb
simplecov-0.8.0.pre2 test/test_command_guesser.rb
simplecov-0.8.0.pre test/test_command_guesser.rb