Sha256: 0166d58ea5ef63575fd26e1f4db11ecbd86f2a45e663ac499681f0c8045078fb

Contents?: true

Size: 823 Bytes

Versions: 74

Compression:

Stored size: 823 Bytes

Contents

# frozen_string_literal: true

require 'eac_cli/runner_with/help'
require 'eac_ruby_utils/fs/temp'

RSpec.describe ::EacCli::RunnerWith::Help do
  let(:runner) do
    the_module = described_class
    Class.new do
      include the_module

      runner_definition do
        desc 'A stub runner.'
        pos_arg :a_argument
      end

      def run
        puts 'Runner run'
      end
    end
  end

  let(:runner_argv) { ['--help'] }
  let(:instance) { runner.create(argv: runner_argv) }
  let(:expected_output) do
    <<~OUTPUT
      A stub runner.

      Usage:
        __PROGRAM__ [options] <a_argument>
        __PROGRAM__ --help

      Options:
        -h --help    Show help.

    OUTPUT
  end

  it 'show help text' do
    expect { instance.run_run }.to output(expected_output).to_stdout_from_any_process
  end
end

Version data entries

74 entries across 74 versions & 2 rubygems

Version Path
avm-tools-0.117.0 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.116.2 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.116.1 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.116.0 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.115.0 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.114.2 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.114.1 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.114.0 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.113.6 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.113.5 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.113.4 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.113.3 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.113.2 sub/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
ehbrs-tools-0.28.3 vendor/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.110.0 vendor/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.109.1 vendor/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.109.0 vendor/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
ehbrs-tools-0.28.2 vendor/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
avm-tools-0.108.0 vendor/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb
ehbrs-tools-0.28.1 vendor/eac_cli/spec/lib/eac_cli/runner_with/help_spec.rb