Sha256: 9ff3bcb85b0643f5bfca703724c8ec7940f755d2bddb51134b69189e26dda5f3

Contents?: true

Size: 1.08 KB

Versions: 12

Compression:

Stored size: 1.08 KB

Contents

require "helper"

class TestCommandGuesser < Minitest::Test
  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

12 entries across 12 versions & 5 rubygems

Version Path
suzuko-0.1.8 vendor/bundle/ruby/2.0.0/gems/simplecov-0.10.0/test/test_command_guesser.rb
suzuko-0.1.7 vendor/bundle/ruby/2.0.0/gems/simplecov-0.10.0/test/test_command_guesser.rb
mastermind_adeybee-0.1.4 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/test/test_command_guesser.rb
mastermind_adeybee-0.1.3 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/test/test_command_guesser.rb
mastermind_adeybee-0.1.2 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/test/test_command_guesser.rb
mastermind_adeybee-0.1.1 vendor/bundle/ruby/2.2.0/gems/simplecov-0.10.0/test/test_command_guesser.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/simplecov-0.10.0/test/test_command_guesser.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/simplecov-0.10.0/test/test_command_guesser.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/simplecov-0.10.0/test/test_command_guesser.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/simplecov-0.10.0/test/test_command_guesser.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/simplecov-0.10.0/test/test_command_guesser.rb
simplecov-0.10.0 test/test_command_guesser.rb