Sha256: 011d735fc99960f91998d616479aa9dad08327a31436766b13a46d7eb3cebd29

Contents?: true

Size: 1.07 KB

Versions: 38

Compression:

Stored size: 1.07 KB

Contents

require "spec_helper"

RSpec.describe "Command line help output" do
  let(:help_text) { suspenders_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 suspenders" do
    expect(help_text).to include <<~EOH
      Usage:
        suspenders APP_PATH [options]
    EOH
  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 suspenders group" do
    expect(help_text).to include <<~EOH
Suspenders options:
  -h, [--help], [--no-help]        # Show this help message and quit
  -v, [--version], [--no-version]  # Show Suspenders version number and quit
EOH
  end

  it "does not show the default extended rails help section" do
    expect(help_text).not_to include("Create suspenders files for app generator.")
  end

  it "contains the usage statement from the suspenders gem" do
    expect(help_text).to include IO.read(usage_file)
  end
end

Version data entries

38 entries across 38 versions & 3 rubygems

Version Path
suspenders-1.54.1 spec/features/cli_help_spec.rb
suspenders-1.54.0 spec/features/cli_help_spec.rb
suspenders-1.53.0 spec/features/cli_help_spec.rb
suspenders-1.52.0 spec/features/cli_help_spec.rb
suspenders-1.51.0 spec/features/cli_help_spec.rb
suspenders-1.50.0 spec/features/cli_help_spec.rb
suspenders-1.49.0 spec/features/cli_help_spec.rb
suspenders-1.48.0 spec/features/cli_help_spec.rb
welaika-suspenders-2.29.0.alpha.2 spec/features/cli_help_spec.rb
welaika-suspenders-2.29.0.alpha.1 spec/features/cli_help_spec.rb
suspenders-1.47.0 spec/features/cli_help_spec.rb
suspenders-1.46.0 spec/features/cli_help_spec.rb
welaika-suspenders-2.28.0 spec/features/cli_help_spec.rb
suspenders-1.45.0 spec/features/cli_help_spec.rb
welaika-suspenders-2.27.0 spec/features/cli_help_spec.rb
voyage-1.44.0.14 spec/features/cli_help_spec.rb
welaika-suspenders-2.26.0 spec/features/cli_help_spec.rb
voyage-1.44.0.13 spec/features/cli_help_spec.rb
voyage-1.44.0.11 spec/features/cli_help_spec.rb
voyage-1.44.0.12 spec/features/cli_help_spec.rb