require "spec_helper" RSpec.describe <%= configuration.project_namespaced_class %>::CLI::Shell do using Refinements::Pathname subject(:shell) { described_class.new } include_context "with application dependencies" before { Sod::Container.stub! kernel:, logger: } after { Sod::Container.restore } 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