Sha256: 64afc1f5731e7d3d4684c2b33adba490fafb1d3c524dea589dec09b1231afd31

Contents?: true

Size: 384 Bytes

Versions: 13

Compression:

Stored size: 384 Bytes

Contents

module MothershipHelpers
  def command(inputs = {})
    cmd = Mothership::Command.new(Mothership)

    inputs.each do |name, opts|
      cmd.add_input(name, opts)
    end

    if block_given?
      yield cmd
    else
      cmd
    end
  end

  def inputs(cmd, *argv)
    Mothership::Parser.new(cmd).parse_argv(argv)
  end
end

RSpec.configure do |c|
  c.include MothershipHelpers
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mothership-0.3.0 spec/helpers.rb
mothership-0.2.5 spec/helpers.rb
mothership-0.2.4 spec/helpers.rb
mothership-0.2.3 spec/helpers.rb
mothership-0.2.2 spec/helpers.rb
mothership-0.2.1 spec/helpers.rb
mothership-0.2.0 spec/helpers.rb
mothership-0.1.5 spec/helpers.rb
mothership-0.1.4 spec/helpers.rb
mothership-0.1.3 spec/helpers.rb
mothership-0.1.2 spec/helpers.rb
mothership-0.1.1 spec/helpers.rb
mothership-0.1.0 spec/helpers.rb