Class: VagrantSpec::Command::Test
- Inherits:
-
Object
- Object
- VagrantSpec::Command::Test
- Includes:
- Utils
- 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
- #execute ⇒ Object
-
#initialize(argv, env) ⇒ Test
constructor
A new instance of Test.
- #parse_opts ⇒ Object
Methods included from Utils
#lib_root, #project_root, #template_dir
Constructor Details
#initialize(argv, env) ⇒ Test
Returns a new instance of Test.
14 15 16 |
# File 'lib/vagrant_spec/command/test.rb', line 14 def initialize(argv, env) super end |
Instance Method Details
#execute ⇒ Object
18 19 20 21 |
# File 'lib/vagrant_spec/command/test.rb', line 18 def execute return unless parse_opts VagrantSpec::TestPlan.new(@env).run end |
#parse_opts ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/vagrant_spec/command/test.rb', line 23 def parse_opts opts = OptionParser.new do |o| o. = "\nTest: Run the tests configured in the Vagrantfile" o.separator '' o.separator 'Usage: vagrant spec test' o.separator '' o.separator IO.read(File.join(template_dir, 'test_help')) end (opts) end |