From: Antonio Terceiro <terceiro@debian.org>
Date: Fri, 20 Jan 2023 13:22:23 -0300
Subject: test_new_command,
 test_configuration: fix test that fails under autopkgtest

---
 test/test_configuration.rb | 2 +-
 test/test_new_command.rb   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/test_configuration.rb b/test/test_configuration.rb
index 5a8f101..a865e79 100644
--- a/test/test_configuration.rb
+++ b/test/test_configuration.rb
@@ -532,7 +532,7 @@ class TestConfiguration < JekyllUnitTest
     should "ignore newlines in that string entirely from the template file" do
       config = Jekyll.configuration(
         @tester.read_config_file(
-          File.expand_path("../lib/site_template/_config.yml", File.dirname(__FILE__))
+          File.expand_path("../site_template/_config.yml", Gem.find_files('jekyll.rb').first)
         )
       )
       assert_includes config["description"], "an awesome description"
diff --git a/test/test_new_command.rb b/test/test_new_command.rb
index c71cf41..f8f4636 100644
--- a/test/test_new_command.rb
+++ b/test/test_new_command.rb
@@ -11,11 +11,11 @@ class TestNewCommand < JekyllUnitTest
   end
 
   def site_template
-    File.expand_path("../lib/site_template", __dir__)
+    File.expand_path("../site_template", Gem.find_files('jekyll.rb').first)
   end
 
   def blank_template
-    File.expand_path("../lib/blank_template", __dir__)
+    File.expand_path("../blank_template", Gem.find_files('jekyll.rb').first)
   end
 
   context "when args contains a path" do
@@ -58,7 +58,7 @@ class TestNewCommand < JekyllUnitTest
       end
       static_template_files << "/Gemfile"
 
-      capture_output { Jekyll::Commands::New.process(@args) }
+      capture_output { Jekyll::Commands::New.process(@args, "--skip-bundle") }
 
       new_site_files = dir_contents(@full_path).reject do |f|
         f.end_with?("welcome-to-jekyll.markdown")
