Sha256: c1e6eca946027faa8ca6a950447063237fcf7564a45feecca6485d80d3397de1
Contents?: true
Size: 631 Bytes
Versions: 3
Compression:
Stored size: 631 Bytes
Contents
# frozen_string_literal: true require 'eac_cli/docopt/runner_extension' RSpec.describe ::EacCli::Docopt::RunnerExtension do let(:stub_runner) do r = Class.new(::EacRubyUtils::Console::DocoptRunner) do def run; end end r.include ::EacCli::Runner r.runner_definition do desc 'A stub runner.' arg_opt '-o', '--opt1', 'A argument option' pos_arg 'pos1' end r end let(:instance) { stub_runner.new(argv: %w[-o aaa bbb]) } before { instance.run } it { expect(instance.options.fetch('--opt1')).to eq('aaa') } it { expect(instance.options.fetch('<pos1>')).to eq('bbb') } end
Version data entries
3 entries across 3 versions & 2 rubygems