Skip to content

Commit

Permalink
Remove disable_autorun (#30)
Browse files Browse the repository at this point in the history
* Remove disable_autorun

* Update changelog

* Remove scenarios that were only testing the disable_autorun feature

Co-authored-by: Aurelien Reeves <aurelien.reeves@smartbear.com>

Co-authored-by: Matt Wynne <matt@cucumber.io>
  • Loading branch information
aurelien-reeves and mattwynne authored May 4, 2022
1 parent b4e5f92 commit d36742e
Show file tree
Hide file tree
Showing 16 changed files with 6 additions and 67 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CO
* Drop support for ruby < 2.0
([PR#28](https://github.com/cucumber/multi_test/pull/28))

### 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
Expand Down
27 changes: 0 additions & 27 deletions lib/multi_test.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion test/gemfiles/activesupport-4/scenarios
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
require_activesupport_testing_autorun.rb
minitest_assertions.rb
1 change: 0 additions & 1 deletion test/gemfiles/activesupport-5/scenarios
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
require_activesupport_testing_autorun.rb
minitest_assertions.rb
2 changes: 0 additions & 2 deletions test/gemfiles/minitest-4/scenarios
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
bundler_require.rb
minitest_propagate_exit_code.rb
minitest_assertions.rb
2 changes: 0 additions & 2 deletions test/gemfiles/minitest-5/scenarios
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
bundler_require.rb
minitest_propagate_exit_code.rb
minitest_assertions.rb
1 change: 0 additions & 1 deletion test/gemfiles/plain-ruby/scenarios
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
bundler_require.rb
no_assertion_library.rb

1 change: 0 additions & 1 deletion test/gemfiles/rspec-1/scenarios
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
bundler_require.rb
spec_matchers.rb

1 change: 0 additions & 1 deletion test/gemfiles/rspec-2/scenarios
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
bundler_require.rb
rspec_matchers.rb

1 change: 0 additions & 1 deletion test/gemfiles/rspec-3/scenarios
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
bundler_require.rb
rspec_matchers.rb
2 changes: 0 additions & 2 deletions test/gemfiles/test-unit-2/scenarios
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
bundler_require.rb
require_test_unit.rb
test_unit_assertions.rb
2 changes: 0 additions & 2 deletions test/gemfiles/test-unit-3/scenarios
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
bundler_require.rb
require_test_unit.rb
test_unit_assertions.rb
7 changes: 0 additions & 7 deletions test/scenarios/bundler_require.rb

This file was deleted.

9 changes: 0 additions & 9 deletions test/scenarios/minitest_propagate_exit_code.rb

This file was deleted.

4 changes: 0 additions & 4 deletions test/scenarios/require_activesupport_testing_autorun.rb

This file was deleted.

6 changes: 0 additions & 6 deletions test/scenarios/require_test_unit.rb

This file was deleted.

0 comments on commit d36742e

Please sign in to comment.