aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/test_unit/reporter_test.rb
diff options
context:
space:
mode:
authorArthur Neves <arthurnn@gmail.com>2015-02-03 21:54:50 -0500
committerYves Senn <yves.senn@gmail.com>2015-03-18 09:52:19 +0100
commitf10c7e184939064be9e4995551efc3ebc3a8b883 (patch)
tree17e66aae7b928e2f43a1c559545fb2ecac978272 /railties/test/test_unit/reporter_test.rb
parent6ccbeb458a5698db6242d7bd326ef9d9bd23c7b6 (diff)
downloadrails-f10c7e184939064be9e4995551efc3ebc3a8b883.tar.gz
rails-f10c7e184939064be9e4995551efc3ebc3a8b883.tar.bz2
rails-f10c7e184939064be9e4995551efc3ebc3a8b883.zip
Fix reporter test and verbose mode
Diffstat (limited to 'railties/test/test_unit/reporter_test.rb')
-rw-r--r--railties/test/test_unit/reporter_test.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/railties/test/test_unit/reporter_test.rb b/railties/test/test_unit/reporter_test.rb
index 587a0f878b..77883612f5 100644
--- a/railties/test/test_unit/reporter_test.rb
+++ b/railties/test/test_unit/reporter_test.rb
@@ -12,7 +12,7 @@ class TestUnitReporterTest < ActiveSupport::TestCase
end
test "prints rerun snippet to run a single failed test" do
- @reporter.results << failed_test
+ @reporter.record(failed_test)
@reporter.report
assert_match %r{^bin/rails test .*test/test_unit/reporter_test.rb:6$}, @output.string
@@ -20,26 +20,24 @@ class TestUnitReporterTest < ActiveSupport::TestCase
end
test "prints rerun snippet for every failed test" do
- @reporter.results << failed_test
- @reporter.results << failed_test
- @reporter.results << failed_test
+ @reporter.record(failed_test)
+ @reporter.record(failed_test)
+ @reporter.record(failed_test)
@reporter.report
assert_rerun_snippet_count 3
end
test "does not print snippet for successful and skipped tests" do
- skip "confirm the expected behavior with Arthur"
- @reporter.results << passing_test
- @reporter.results << skipped_test
+ @reporter.record(passing_test)
+ @reporter.record(skipped_test)
@reporter.report
assert_rerun_snippet_count 0
end
test "prints rerun snippet for skipped tests if run in verbose mode" do
- skip "confirm the expected behavior with Arthur"
verbose = Rails::TestUnitReporter.new @output, verbose: true
- verbose.results << skipped_test
+ verbose.record(skipped_test)
verbose.report
assert_rerun_snippet_count 1