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