Sha256: 54428ea5a4b3afc78414c43edecf4db23451459e7b39b05aa1c8bd95852e7f59

Contents?: true

Size: 380 Bytes

Versions: 15

Compression:

Stored size: 380 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).inputs(argv)
  end
end

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mothership-0.0.15 spec/helpers.rb
mothership-0.0.14 spec/helpers.rb
mothership-0.0.13 spec/helpers.rb
mothership-0.0.12 spec/helpers.rb
mothership-0.0.11 spec/helpers.rb
mothership-0.0.10 spec/helpers.rb
mothership-0.0.9 spec/helpers.rb
mothership-0.0.8 spec/helpers.rb
mothership-0.0.7 spec/helpers.rb
mothership-0.0.6 spec/helpers.rb
mothership-0.0.5 spec/helpers.rb
mothership-0.0.4 spec/helpers.rb
mothership-0.0.3 spec/helpers.rb
mothership-0.0.2 spec/helpers.rb
mothership-0.0.1 spec/helpers.rb