-
-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fail fast if test-unit/minitest integration fails
If someone is explicitly requiring "mocha/test_unit" or "mocha/minitest" then the implication is that they know which test framework they are trying to integrate with. If the Mocha integration fails (because the test framework hasn't been loaded) then we should raise an error. Closes #229.
- Loading branch information
1 parent
ca69dc9
commit f8215a1
Showing
2 changed files
with
2 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
require 'mocha/ruby_version' | ||
require 'mocha/integration/mini_test' | ||
require 'mocha/deprecation' | ||
|
||
unless Mocha::Integration::MiniTest.activate | ||
Mocha::Deprecation.warning( | ||
"MiniTest must be loaded *before* `require 'mocha/minitest'`." | ||
) | ||
raise "MiniTest must be loaded *before* `require 'mocha/minitest'`." | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
require 'mocha/ruby_version' | ||
require 'mocha/integration/test_unit' | ||
require 'mocha/deprecation' | ||
|
||
unless Mocha::Integration::TestUnit.activate | ||
Mocha::Deprecation.warning( | ||
"Test::Unit must be loaded *before* `require 'mocha/test_unit'`." | ||
) | ||
raise "Test::Unit must be loaded *before* `require 'mocha/test_unit'`." | ||
end |