summaryrefslogtreecommitdiff
path: root/spec/integration/cli/build_spec.rb
blob: 0e513018f06570875b4ceb2a2757ee4bb8365c02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

RSpec.describe '`spandx build` command', type: :cli do
  it 'executes `spandx help build` command successfully' do
    output = `spandx help build`
    expected_output = <<~OUT
      Usage:
        spandx build

      Options:
        -h, [--help], [--no-help]    # Display usage information
        -d, [--directory=DIRECTORY]  # Directory to build index in
                                     # Default: .index
        -l, [--logfile=LOGFILE]      # Path to a logfile
                                     # Default: /dev/null
        -i, [--index=INDEX]          # The specific index to build
                                     # Default: all

      Build a package index
    OUT
    expect(output).to eq(expected_output)
  end
end