diff options
author | Ryan Davis <ryand-ruby@zenspider.com> | 2022-10-20 10:21:29 -0800 |
---|---|---|
committer | Ryan Davis <ryand-ruby@zenspider.com> | 2022-10-20 10:21:29 -0800 |
commit | 97214fc54328d4db84f6bbae4b6b8c30dc63d05a (patch) | |
tree | c5fa3cd32d5d0e25b21b0dd287db5a916c5ba4ca | |
parent | e9045496d7f74267405e4121422dbcfaef75d519 (diff) | |
download | hoe-97214fc54328d4db84f6bbae4b6b8c30dc63d05a.tar.gz |
+ Added warning to bundled minitest/test_task.
- Fixed test task load path issue, prepend Hoe.include_dirs to ensure they come first.
[git-p4: depot-paths = "//src/hoe/dev/": change = 13575]
-rw-r--r-- | lib/hoe/test.rb | 2 | ||||
-rw-r--r-- | lib/minitest/test_task.rb | 9 | ||||
-rw-r--r-- | test/test_hoe.rb | 2 | ||||
-rw-r--r-- | test/test_hoe_test.rb | 7 |
4 files changed, 13 insertions, 7 deletions
diff --git a/lib/hoe/test.rb b/lib/hoe/test.rb index e959153..a19d6ca 100644 --- a/lib/hoe/test.rb +++ b/lib/hoe/test.rb @@ -88,7 +88,7 @@ module Hoe::Test test_prelude = self.test_prelude self.test_task = Minitest::TestTask.create :test do |t| t.test_prelude = test_prelude - t.libs += Hoe.include_dirs.uniq + t.libs.prepend Hoe.include_dirs.uniq end when :testunit then desc "Run the test suite. Use FILTER or TESTOPTS to add flags/args." diff --git a/lib/minitest/test_task.rb b/lib/minitest/test_task.rb index 9c2e5d7..cee8c4e 100644 --- a/lib/minitest/test_task.rb +++ b/lib/minitest/test_task.rb @@ -2,6 +2,15 @@ require "shellwords" require "rbconfig" require "rake/tasklib" +warn <<~EOM + minitest/test_task.rb is now packaged with minitest. If you see + this, you are getting it from hoe instead. If you're NOT able to + upgrade minitest to pick this up, please drop an issue on + seattlerb/hoe and let me know. + + Required from #{caller[2]} +EOM + module Minitest # :nodoc: ## diff --git a/test/test_hoe.rb b/test/test_hoe.rb index 9850313..5e34b4a 100644 --- a/test/test_hoe.rb +++ b/test/test_hoe.rb @@ -265,7 +265,7 @@ class TestHoe < Minitest::Test h = nil nokogiri_readme = <<~EOM ## Links - + * https://nokogiri.org * [Installation Help](https://nokogiri.org/tutorials/installing_nokogiri.html) * [Tutorials](https://nokogiri.org/tutorials/toc.html) diff --git a/test/test_hoe_test.rb b/test/test_hoe_test.rb index 8cf634f..011e4e3 100644 --- a/test/test_hoe_test.rb +++ b/test/test_hoe_test.rb @@ -1,5 +1,6 @@ require "minitest/autorun" require "hoe" +require "minitest/test_task" # currently in hoe, but will move Hoe.load_plugins # make sure Hoe::Test is loaded @@ -60,11 +61,9 @@ class TestHoeTest < Minitest::Test def test_make_test_cmd_for_minitest skip "Using TESTOPTS... skipping" if ENV["TESTOPTS"] - require "minitest/test_task" # currently in hoe, but will move - framework = %(require "minitest/autorun"; ) - @tester = Minitest::TestTask.create :test do |t| + @tester = Minitest::TestTask.create :testtest do |t| t.libs += Hoe.include_dirs.uniq t.test_globs = ["test/test_hoe_test.rb"] end @@ -75,8 +74,6 @@ class TestHoeTest < Minitest::Test def test_make_test_cmd_for_minitest_prelude skip "Using TESTOPTS... skipping" if ENV["TESTOPTS"] - require "minitest/test_task" # currently in hoe, but will move - prelude = %(require "other/file") framework = %(require "minitest/autorun"; ) |