# frozen_string_literal: true require "spec_helper" RSpec.describe "Command line help output" do let(:help_text) { tractor_beam_help_command } it "does not contain the default rails usage statement" do expect(help_text).not_to include("rails new APP_PATH [options]") end it "provides the correct usage statement for tractor_beam" do expect(help_text).to include <<~TEXT Usage: tractor_beam APP_PATH [options] TEXT end it "does not contain the default rails group" do expect(help_text).not_to include("Rails options:") end it "provides help and version usage within the tractor_beam group" do expect(help_text).to include <<~TEXT Tractor_beam options: -h, [--help], [--no-help] # Show this help message and quit -v, [--version], [--no-version] # Show TractorBeam version number and quit TEXT end it "does not show the default extended rails help section" do expect(help_text).not_to include("Create tractor_beam files for app generator.") end it "contains the usage statement from the tractor_beam gem" do expect(help_text).to include IO.read(usage_file) end end