require "spec_helper" RSpec.describe <%= configuration.project_namespaced_class %>::CLI::Shell do using Refinements::Pathnames using Infusible::Stub subject(:shell) { described_class.new } include_context "with application dependencies" before { Sod::Import.stub kernel:, logger: } after { Sod::Import.unstub :kernel, :logger } describe "#call" do it "prints configuration usage" do shell.call %w[config] expect(kernel).to have_received(:puts).with(/Manage configuration.+/m) end it "prints version" do shell.call %w[--version] expect(kernel).to have_received(:puts).with(/<%= configuration.project_label.gsub(" ", "\\s") %>\s\d+\.\d+\.\d+/) end it "prints help" do shell.call %w[--help] expect(kernel).to have_received(:puts).with(/<%= configuration.project_label.gsub(" ", "\\s") %>.+USAGE.+/m) end end end