Sha256: d2687a6688917cb1e2dea4a599059eecaef48dad664b99166b13bbcf34d4a4f4

Contents?: true

Size: 1017 Bytes

Versions: 44

Compression:

Stored size: 1017 Bytes

Contents

require 'helper'

class TestCommandGuesser < Test::Unit::TestCase
  on_ruby '1.9' do
    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'
    should_guess_command_name "Functional Tests", '/some/path/test/functional/foo_bar_controller_test.rb'
    should_guess_command_name "Integration Tests", '/some/path/test/integration/foo_bar_controller_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
end

Version data entries

44 entries across 34 versions & 6 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/gems/simplecov-0.7.1/test/test_command_guesser.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-1.0.0 vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-1.0.0.beta3 vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/simplecov-0.7.1/test/test_command_guesser.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-1.0.0.beta2 vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-1.0.0.beta vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-0.9.1.beta.3 vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
devise_sociable-0.1.0 vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-0.9.1.beta vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-0.9.0 vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/simplecov-0.6.4/test/test_command_guesser.rb
challah-rolls-0.2.0 vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
challah-rolls-0.2.0 vendor/bundle/gems/simplecov-0.6.4/test/test_command_guesser.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/simplecov-0.6.4/test/test_command_guesser.rb
challah-0.8.3 vendor/bundle/gems/simplecov-0.6.4/test/test_command_guesser.rb
challah-0.8.3 vendor/bundle/gems/simplecov-0.7.1/test/test_command_guesser.rb
simplecov-0.7.1 test/test_command_guesser.rb