RSpec.describe "`<%= "#{app_name_underscored} #{cmd_name_underscored}" %>` command", type: :cli do it "executes `<%= "#{app_name_underscored} help #{cmd_name_underscored}" %>` command successfully" do output = `<%= "#{app_name_underscored} help #{cmd_name_underscored}" %>` expected_output = <<-OUT <%- if subcmd_name_underscored.to_s.empty? -%> Usage: <%= app_name_underscored + ' ' + cmd_name_underscored + cmd_desc_args %> Options: -h, [--help], [--no-help] # Display usage information <%= cmd_desc %> <%- else -%> Commands: <%- end -%> OUT expect(output).to eq(expected_output) end end