mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-10 07:28:07 -05:00
Render theme-gem root only in development (#9680)
Merge pull request 9680
This commit is contained in:
@@ -22,7 +22,7 @@ class TestThemeDrop < JekyllUnitTest
|
||||
"dependencies" => [],
|
||||
"description" => "This is a theme used to test Jekyll",
|
||||
"metadata" => {},
|
||||
"root" => theme_dir,
|
||||
"root" => "",
|
||||
"version" => "0.1.0",
|
||||
}
|
||||
expected.each_key do |key|
|
||||
@@ -30,5 +30,22 @@ class TestThemeDrop < JekyllUnitTest
|
||||
assert_equal expected[key], @drop[key]
|
||||
end
|
||||
end
|
||||
|
||||
should "render gem root only in development mode" do
|
||||
with_env("JEKYLL_ENV", nil) do
|
||||
drop = fixture_site("theme" => "test-theme").to_liquid.theme
|
||||
assert_equal "", drop["root"]
|
||||
end
|
||||
|
||||
with_env("JEKYLL_ENV", "development") do
|
||||
drop = fixture_site("theme" => "test-theme").to_liquid.theme
|
||||
assert_equal theme_dir, drop["root"]
|
||||
end
|
||||
|
||||
with_env("JEKYLL_ENV", "production") do
|
||||
drop = fixture_site("theme" => "test-theme").to_liquid.theme
|
||||
assert_equal "", drop["root"]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user