diff --git a/CHANGELOG.md b/CHANGELOG.md index 235a514..8583c99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO * As per [#251](https://github.com/cucumber/cucumber/issues/251): renamed History.md to CHANGELOG.md, added contributing message at beginning, and other formatting. ([#12](https://github.com/cucumber/multi_test/pull/12) [jaysonesmith](https://github.com/jaysonesmith/)) +### Removed + +* Removed `disable_autorun` + ([PR#30](https://github.com/cucumber/multi_test/pull/30) + [Issue#26](https://github.com/cucumber/multi_test/issues/26)) + ## [v0.1.2](https://github.com/cucumber/multi_test/compare/v0.1.1...v0.1.2) * Ensure that detecting assetion library doesn't fail if no test framework diff --git a/lib/multi_test.rb b/lib/multi_test.rb index f8717b5..1dfe398 100644 --- a/lib/multi_test.rb +++ b/lib/multi_test.rb @@ -1,32 +1,5 @@ require 'multi_test/assertion_library' module MultiTest - def self.disable_autorun - if defined?(Test::Unit::Runner) - Test::Unit::Runner.module_eval("@@stop_auto_run = true") - end - - if defined?(Minitest) - Minitest.instance_eval do - def run(*) - # propagate the exit code from cucumber or another runner - case $! - when SystemExit - $!.status - else - true - end - end - end - - if defined?(Minitest::Unit) - Minitest::Unit.class_eval do - def run(*) - end - end - end - end - end - def self.extend_with_best_assertion_library(object) AssertionLibrary.detect_best.extend_world(object) end diff --git a/test/gemfiles/activesupport-4/scenarios b/test/gemfiles/activesupport-4/scenarios index 726415f..bb0c25a 100644 --- a/test/gemfiles/activesupport-4/scenarios +++ b/test/gemfiles/activesupport-4/scenarios @@ -1,2 +1 @@ -require_activesupport_testing_autorun.rb minitest_assertions.rb diff --git a/test/gemfiles/activesupport-5/scenarios b/test/gemfiles/activesupport-5/scenarios index 726415f..bb0c25a 100644 --- a/test/gemfiles/activesupport-5/scenarios +++ b/test/gemfiles/activesupport-5/scenarios @@ -1,2 +1 @@ -require_activesupport_testing_autorun.rb minitest_assertions.rb diff --git a/test/gemfiles/minitest-4/scenarios b/test/gemfiles/minitest-4/scenarios index 8b68a9b..bb0c25a 100644 --- a/test/gemfiles/minitest-4/scenarios +++ b/test/gemfiles/minitest-4/scenarios @@ -1,3 +1 @@ -bundler_require.rb -minitest_propagate_exit_code.rb minitest_assertions.rb diff --git a/test/gemfiles/minitest-5/scenarios b/test/gemfiles/minitest-5/scenarios index 8b68a9b..bb0c25a 100644 --- a/test/gemfiles/minitest-5/scenarios +++ b/test/gemfiles/minitest-5/scenarios @@ -1,3 +1 @@ -bundler_require.rb -minitest_propagate_exit_code.rb minitest_assertions.rb diff --git a/test/gemfiles/plain-ruby/scenarios b/test/gemfiles/plain-ruby/scenarios index 8b465d2..bbdd8e4 100644 --- a/test/gemfiles/plain-ruby/scenarios +++ b/test/gemfiles/plain-ruby/scenarios @@ -1,3 +1,2 @@ -bundler_require.rb no_assertion_library.rb diff --git a/test/gemfiles/rspec-1/scenarios b/test/gemfiles/rspec-1/scenarios index 871eba8..7b5d086 100644 --- a/test/gemfiles/rspec-1/scenarios +++ b/test/gemfiles/rspec-1/scenarios @@ -1,3 +1,2 @@ -bundler_require.rb spec_matchers.rb diff --git a/test/gemfiles/rspec-2/scenarios b/test/gemfiles/rspec-2/scenarios index 9e3ed30..8058221 100644 --- a/test/gemfiles/rspec-2/scenarios +++ b/test/gemfiles/rspec-2/scenarios @@ -1,3 +1,2 @@ -bundler_require.rb rspec_matchers.rb diff --git a/test/gemfiles/rspec-3/scenarios b/test/gemfiles/rspec-3/scenarios index 6ad328a..70e8be3 100644 --- a/test/gemfiles/rspec-3/scenarios +++ b/test/gemfiles/rspec-3/scenarios @@ -1,2 +1 @@ -bundler_require.rb rspec_matchers.rb diff --git a/test/gemfiles/test-unit-2/scenarios b/test/gemfiles/test-unit-2/scenarios index 5e7425d..8b36e6e 100644 --- a/test/gemfiles/test-unit-2/scenarios +++ b/test/gemfiles/test-unit-2/scenarios @@ -1,3 +1 @@ -bundler_require.rb -require_test_unit.rb test_unit_assertions.rb diff --git a/test/gemfiles/test-unit-3/scenarios b/test/gemfiles/test-unit-3/scenarios index 5e7425d..8b36e6e 100644 --- a/test/gemfiles/test-unit-3/scenarios +++ b/test/gemfiles/test-unit-3/scenarios @@ -1,3 +1 @@ -bundler_require.rb -require_test_unit.rb test_unit_assertions.rb diff --git a/test/scenarios/bundler_require.rb b/test/scenarios/bundler_require.rb deleted file mode 100644 index 2eb0908..0000000 --- a/test/scenarios/bundler_require.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Imagine this is your rails app -Bundler.require - -# Now cucumber loads -require "multi_test" -MultiTest.disable_autorun - diff --git a/test/scenarios/minitest_propagate_exit_code.rb b/test/scenarios/minitest_propagate_exit_code.rb deleted file mode 100644 index b2747a1..0000000 --- a/test/scenarios/minitest_propagate_exit_code.rb +++ /dev/null @@ -1,9 +0,0 @@ -# Imagine this is your rails app -require 'minitest/autorun' - -# Now cucumber loads and exits successfully -require "multi_test" -MultiTest.disable_autorun -exit 0 - -# Our Minitest hook should propagate that healthy status code diff --git a/test/scenarios/require_activesupport_testing_autorun.rb b/test/scenarios/require_activesupport_testing_autorun.rb deleted file mode 100644 index c0a8162..0000000 --- a/test/scenarios/require_activesupport_testing_autorun.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'active_support/testing/autorun' - -require "multi_test" -MultiTest.disable_autorun diff --git a/test/scenarios/require_test_unit.rb b/test/scenarios/require_test_unit.rb deleted file mode 100644 index 80ab0e8..0000000 --- a/test/scenarios/require_test_unit.rb +++ /dev/null @@ -1,6 +0,0 @@ -# Imagine this is your rails app -require 'test/unit' - -# Now cucumber loads -require "multi_test" -MultiTest.disable_autorun