Sha256: f87d482ca71d78376df4e25e3b150943413c37eb34e1d090fbbfd4e4062e5303
Contents?: true
Size: 1.92 KB
Versions: 6
Compression:
Stored size: 1.92 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
6 entries across 6 versions & 2 rubygems