Sha256: 93754bd1ec7a1b1506e59c23ef24d055f54da673449b520d32acf0f2d3730d67

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

# 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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tractor_beam-0.1.4 spec/features/cli_help_spec.rb
tractor_beam-0.1.2 spec/features/cli_help_spec.rb