Skip to content

Commit

Permalink
test: ensure that plugins list command output is correct
Browse files Browse the repository at this point in the history
  • 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.
32 changes: 32 additions & 0 deletions bridgetown-core/test/test_plugins_command.rb
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

0 comments on commit a8915a7

Please sign in to comment.