Sha256: 0fcd3b502164db86e187b3703f55eface7d768e2d07bcff93e96e699c65722fd

Contents?: true

Size: 1.11 KB

Versions: 3

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

require 'spec_helper'

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

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
underlay-2.0 spec/features/cli_help_spec.rb
underlay-1.52.1 spec/features/cli_help_spec.rb
underlay-1.50.1 spec/features/cli_help_spec.rb