Sha256: 586858f79f4a6e417727da38296ee90f27dd2287703ea25383aa0c9b1d7511d1

Contents?: true

Size: 1.74 KB

Versions: 33

Compression:

Stored size: 1.74 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 #{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 #{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 #{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 #{test_filename} -n /^test_0001_works$/ 2>&1`
      refute_match '0 out of 0', output, 'Progress should not puts a warning'
    end
  end
end

Version data entries

33 entries across 26 versions & 8 rubygems

Version Path
josufst_palindrome-0.2.0 vendor/cache/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
josufst_palindrome-0.2.0 vendor/cache/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
josufst_palindrome-0.1.1 vendor/cache/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
josufst_palindrome-0.1.1 vendor/cache/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
hirohig_palindrome-0.2.0 vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
hirohig_palindrome-0.1.0 vendor/bundle/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
cspeezy_palindrome-0.3.0 path/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
cspeezy_palindrome-0.2.0 path/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
cspeezy_palindrome-0.1.0 path/ruby/2.6.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
steenfest_palindrome-0.1.2 ruby/2.5/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
steenfest_palindrome-0.1.1b ruby/2.5/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
dmurphy_palindrome-0.1.0 vendor/cache/ruby/2.3.0/gems/dmurphy_palindrome-0.1.0/vendor/cache/ruby/2.3.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
dmurphy_palindrome-0.1.0 vendor/cache/ruby/2.3.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
lgrgic_palindrome_detector-0.2.0 vendor/cache/gems/lgrgic_palindrome_detector-0.1.0/vendor/cache/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
lgrgic_palindrome_detector-0.2.0 vendor/cache/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
lgrgic_palindrome_detector-0.1.0 vendor/cache/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
wfrey_palindrome-0.3.0 vendor/bundle/ruby/2.3.0/gems/wfrey_palindrome-0.1.0/vendor/bundle/ruby/2.3.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
wfrey_palindrome-0.3.0 vendor/bundle/ruby/2.3.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
wfrey_palindrome-0.2.0 vendor/bundle/ruby/2.3.0/gems/wfrey_palindrome-0.1.0/vendor/bundle/ruby/2.3.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb
wfrey_palindrome-0.2.0 vendor/bundle/ruby/2.3.0/gems/minitest-reporters-1.2.0/test/integration/reporters/progress_reporter_test.rb