Class: VagrantSpec::Command::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_spec/command/test.rb

Overview

This command instantiates serveral files for deployment and testing

argv env [Vagrant::Environment]

Instance Method Summary collapse

Constructor Details

#initialize(argv, env) ⇒ Test

Returns a new instance of Test.



12
13
14
# File 'lib/vagrant_spec/command/test.rb', line 12

def initialize(argv, env)
  super
end

Instance Method Details

#executeObject



16
17
18
19
# File 'lib/vagrant_spec/command/test.rb', line 16

def execute
  return unless parse_opts
  VagrantSpec::TestPlan.new(@env).run
end

#parse_optsObject



21
22
23
24
25
26
27
28
29
# File 'lib/vagrant_spec/command/test.rb', line 21

def parse_opts
  opts = OptionParser.new do |o|
    o.banner = "\nRun the tests configured in the Vagrantfile"
    o.separator ''
    o.separator 'Usage: vagrant spec test'
    o.separator ''
  end
  parse_options(opts)
end