migrate existing tests to `should` syntax
This commit is contained in:
parent
3b2bbcb70f
commit
2236ee4284
|
@ -8,23 +8,28 @@ class TestPluginManager < JekyllUnitTest
|
||||||
FileUtils.mv "Gemfile.old", "Gemfile"
|
FileUtils.mv "Gemfile.old", "Gemfile"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_requiring_from_bundler
|
context "JEKYLL_NO_BUNDLER_REQUIRE set to `nil`" do
|
||||||
|
should "require from bundler" do
|
||||||
with_env("JEKYLL_NO_BUNDLER_REQUIRE", nil) do
|
with_env("JEKYLL_NO_BUNDLER_REQUIRE", nil) do
|
||||||
assert Jekyll::PluginManager.require_from_bundler,
|
assert Jekyll::PluginManager.require_from_bundler,
|
||||||
"require_from_bundler should return true."
|
"require_from_bundler should return true."
|
||||||
assert ENV["JEKYLL_NO_BUNDLER_REQUIRE"], "Gemfile plugins were not required."
|
assert ENV["JEKYLL_NO_BUNDLER_REQUIRE"], "Gemfile plugins were not required."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_blocking_requiring_from_bundler
|
context "JEKYLL_NO_BUNDLER_REQUIRE set to `true`" do
|
||||||
|
should "not require from bundler" do
|
||||||
with_env("JEKYLL_NO_BUNDLER_REQUIRE", "true") do
|
with_env("JEKYLL_NO_BUNDLER_REQUIRE", "true") do
|
||||||
assert_equal false, Jekyll::PluginManager.require_from_bundler,
|
assert_equal false, Jekyll::PluginManager.require_from_bundler,
|
||||||
"Gemfile plugins were required but shouldn't have been"
|
"Gemfile plugins were required but shouldn't have been"
|
||||||
assert ENV["JEKYLL_NO_BUNDLER_REQUIRE"]
|
assert ENV["JEKYLL_NO_BUNDLER_REQUIRE"]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_no_gemfile
|
context "JEKYLL_NO_BUNDLER_REQUIRE set to `nil` and no Gemfile present" do
|
||||||
|
should "not require from bundler" do
|
||||||
with_env("JEKYLL_NO_BUNDLER_REQUIRE", nil) do
|
with_env("JEKYLL_NO_BUNDLER_REQUIRE", nil) do
|
||||||
with_no_gemfile do
|
with_no_gemfile do
|
||||||
assert_equal false, Jekyll::PluginManager.require_from_bundler,
|
assert_equal false, Jekyll::PluginManager.require_from_bundler,
|
||||||
|
@ -34,3 +39,4 @@ class TestPluginManager < JekyllUnitTest
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue