Sha256: de5178b01f335ddc3d04342d302436ed88d4440c88ec1501efa3f7218c19ec0a

Contents?: true

Size: 1.88 KB

Versions: 62

Compression:

Stored size: 1.88 KB

Contents

require_relative "../../test_helper"

module MinitestReportersTest
  class ProgressReporterTest < TestCase
    def test_all_failures_are_displayed
      fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
      test_filename = File.join(fixtures_directory, 'progress_test.rb')
      output = `#{ruby_executable} #{test_filename} 2>&1`
      assert_match 'ERROR["test_error"', output, 'Errors should be displayed'
      assert_match 'FAIL["test_failure"', output, 'Failures should be displayed'
      assert_match 'SKIP["test_skip', output, 'Skipped tests should be displayed'
    end
    def test_skipped_tests_are_not_displayed
      fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
      test_filename = File.join(fixtures_directory, 'progress_detailed_skip_test.rb')
      output = `#{ruby_executable} #{test_filename} 2>&1`
      assert_match 'ERROR["test_error"', output, 'Errors should be displayed'
      assert_match 'FAIL["test_failure"', output, 'Failures should be displayed'
      refute_match 'SKIP["test_skip', output, 'Skipped tests should not be displayed'
    end
    def test_progress_works_with_filter_and_specs
      fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
      test_filename = File.join(fixtures_directory, 'spec_test.rb')
      output = `#{ruby_executable} #{test_filename} -n /length/ 2>&1`
      refute_match '0 out of 0', output, 'Progress should not puts a warning'
    end
    def test_progress_works_with_strict_filter
      fixtures_directory = File.expand_path('../../../fixtures', __FILE__)
      test_filename = File.join(fixtures_directory, 'spec_test.rb')
      output = `#{ruby_executable} #{test_filename} -n /^test_0001_works$/ 2>&1`
      refute_match '0 out of 0', output, 'Progress should not puts a warning'
    end

    private

    def ruby_executable
      defined?(JRUBY_VERSION) ? 'jruby' : 'ruby'
    end
  end
end

Version data entries

62 entries across 27 versions & 3 rubygems

Version Path
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.1.0 vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/paynow_sdk-1.0.9/vendor/bundle/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.1.0 vendor/bundle/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.9 vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.9 vendor/bundle/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.8 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.8 vendor/bundle/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.7 vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/minitest-reporters-1.4.2/test/integration/reporters/progress_reporter_test.rb