-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Exclude init initializer from plugins list command count (#771)
* fix: exclude init initializer from plugins list command count * test: ensure that plugins list command output is correct --------- Co-authored-by: François Vantomme <[email protected]>
- Loading branch information
Showing
2 changed files
with
36 additions
and
3 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
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 |