+ Calling `srand Minitest.seed` before all shuffles to ensure determinism.
This defends against other tests/libraries calling srand themselves
and messing up minitest's seeded ordering.
[git-p4: depot-paths = "//src/minitest/dev/": change = 13428]
! Changed Minitest::Test to subclass Result and refactored methods up.
+ Minitest.run_one_method now checks for instance of Result, not exact same class.
+ Minitest::Test.run returns a Result version of self, not self.
+ Removed Runnable.marshal_dump/load.
+ ProgressReporter#prerecord now explicitly prints klass.name. Allows for fakers.
Moved Runnable.inherited hook to the bottom of minitest.rb
[git-p4: depot-paths = "//src/minitest/dev/": change = 11473]
Update all old single quoted strings to double quoted.
Get rid of some Really::Old::Coding::Styles().
Update for minor consistency issues.
Found and fixed some odd indentation issues
Marked more named args as optional by prefixing with _
Switched all %x array thingies to use square brackets
Swiched from Hash#has_key? to #key? because it is deprecated.
and probably more.
Was it worth my time? Probably not, but it was an interesting experiment.
[git-p4: depot-paths = "//src/minitest/dev/": change = 9952]
Minitest 5:
Deaths in the family:
! MiniTest.runner is dead. No more manager objects.
! MiniTest::Unit#record is dead. Use a Reporter instance instead.
! MiniTest::Unit._run_* is dead. Runnable things are responsible for their own runs.
! MiniTest::Unit.output is dead. No more centralized IO.
Major (oft incompatible) changes:
! Renamed MiniTest to Minitest. Your pinkies will thank me.
! Removed MiniTest::Unit entirely. No more manager objects.
! Added Minitest::Runnable. Everything minitest can run subclasses this.
! Renamed MiniTest::Unit::TestCase to Minitest::Test (subclassing Runnable).
! Added Minitest::Benchmark.
! Your benchmarks need to move to their own subclass.
! Benchmarks using the spec DSL have to have "Bench" somewhere in their describe.
! MiniTest::Unit.after_tests moved to Minitest.after_tests
! MiniTest::Unit.autorun is now Minitest.autorun. Just require minitest/autorun pls.
! Removed ParallelEach#grep since it isn't used anywhere.
Minor moves:
+ Moved Assertions module to minitest/assertions.rb
+ Moved Expectations module to minitest/expectations.rb
+ Moved Test to minitest/test.rb
+ Moved everything else in minitest/unit.rb to minitest.rb
+ minitest/unit.rb is now just a small (user-test only) compatibility layer.
Additions:
+ Added a plugin system that can extend command-line options.
+ Added Minitest.extensions.
+ Added Minitest.reporter (only available during startup).
+ Added Minitest.run(args). This is the very top of any Minitest run.
+ Added Minitest::Reporter. Everything minitest can report goes through here.
+ Minitest.reporter is a composite so you can add your own.
+ Added Minitest::CompositeReporter. Much easier to extend with your own reporters.
+ Added UnexpectedError, an Assertion subclass, to wrap up errors.
+ Minitest::Test#run is now freakin' beautiful. 47 -> 17 loc
Other:
+ Removed Object.infect_with_assertions (it was already dead code).
+ Runnables are responsible for knowing their result_code (eg "." or "F").
[git-p4: depot-paths = "//src/minitest/dev/": change = 8451]
! Added support for :parallel test_order to run test cases in parallel.
! Added minitest/hell - run all your tests through the ringer!
+ Added TestCase#synchronize
+ Added TestCase.parallelize_me!
Wrapped up or rearranged minitest tests to handle being run in parallel as much as possible.
[git-p4: depot-paths = "//src/minitest/dev/": change = 7861]
assert_report now requires expected arg, adds optional flags arg
assert_report now calls tc.run w/ flags.
assert_report strips hex values from output so we can test no-name testcases.
assert_report tacks a header onto the expected output so tests are cleaner.
Removed a bunch of stupid parens from the tests.
Removed ATestCase from everywhere. So lame.
Removed test_class_inherited since it is also tested by test_class_test_suites
All in all, tests are down 56 lines yet entirely equivalent.
[git-p4: depot-paths = "//src/minitest/dev/": change = 7649]