-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: ensure that plugins list command output is correct
- Loading branch information
François Vantomme
committed
Jul 13, 2023
1 parent
ef44112
commit a8915a7
Showing
1 changed file
with
32 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# frozen_string_literal: true | ||
|
||
require "helper" | ||
require_all "bridgetown-core/commands/concerns" | ||
require "bridgetown-core/commands/plugins" | ||
|
||
class TestPluginsCommand < BridgetownUnitTest | ||
context "list registered plugins" do | ||
setup do | ||
fixture_site | ||
@cmd = Bridgetown::Commands::Plugins.new | ||
end | ||
|
||
should "exclude init (Initializer) from registered plugins list" do | ||
out, err = capture_io do | ||
@cmd.invoke(:list) | ||
end | ||
|
||
assert_nil err | ||
refute_includes "init (Initializer)", out | ||
end | ||
|
||
should "exclude init (Initializer) from registered plugins count" do | ||
out, err = capture_io do | ||
@cmd.invoke(:list) | ||
end | ||
|
||
assert_nil err | ||
assert_includes "Registered Plugins: 3", out | ||
end | ||
end | ||
end |