Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

prevent minitest from printing a --seed run option

See the first FIXME comment in the patch for the rationale.
  • Loading branch information...
commit c15862ae0cb876d745609170f0f90a9bb9b5e0ae 1 parent c9c5656
@fxn fxn authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 activesupport/lib/active_support/test_case.rb
View
14 activesupport/lib/active_support/test_case.rb
@@ -16,6 +16,16 @@
rescue LoadError
end
+# FIXME: We force sorted test order below, but minitest includes --seed SEED in
+# the printed run options, which could be misleading, since users could assume
+# from that trace that tests are being randomized.
+MiniTest::Unit.class_eval do
+ alias original_help help
+ def help
+ original_help.sub(/--seed\s+\d+\s*/, '')
+ end
+end
+
module ActiveSupport
class TestCase < ::MiniTest::Unit::TestCase
Assertion = MiniTest::Assertion
@@ -26,8 +36,8 @@ def self.for_tag(tag)
yield if $tags[tag]
end
- # FIXME: we have tests that depend on run order, we should fix that and
- # remove this method.
+ # FIXME: We have tests that depend on run order, we should fix that and
+ # remove this method (and remove the MiniTest::Unit help hack above).
def self.test_order # :nodoc:
:sorted
end
Please sign in to comment.
Something went wrong with that request. Please try again.