class RSpec::Terraspace::Ts

Constants

CLI

Public Instance Methods

build_test_harness(options={}) click to toggle source
# File lib/rspec/terraspace/ts.rb, line 10
def build_test_harness(options={})
  project = Project.new(options)
  root = project.create
  Terraspace.root = root # switch root to the generated test harness
end
down(args) click to toggle source
# File lib/rspec/terraspace/ts.rb, line 22
def down(args)
  run("down #{args} -y")
end
run(command) click to toggle source
# File lib/rspec/terraspace/ts.rb, line 26
def run(command)
  puts "=> TS_ENV=#{Terraspace.env} terraspace #{command}".color(:green)
  args = command.split(' ')
  CLI.start(args)
end
up(args) click to toggle source
# File lib/rspec/terraspace/ts.rb, line 16
def up(args)
  run("up #{args} -y")
  mod = args.split(' ').first
  @mod = ::Terraspace::Mod.new(mod)
end