Sha256: b729e565529df2029c538e1b8efca949070fd204a0c6488fe730d1d08af777ae

Contents?: true

Size: 1.48 KB

Versions: 4

Compression:

Stored size: 1.48 KB

Contents

Given(/^a Vagrantfile with a adam\.provision_url of "(.*?)"$/) do |provision_url|

  file_content = <<EOS
require 'vagrant-adam'

Vagrant.configure("2") do |config|
  config.vm.define :ubuntu do |ubuntu|
    ubuntu.adam.provision_url = '#{provision_url}'
    ubuntu.vm.box = "precise64"
    ubuntu.vm.box_url = "http://files.vagrantup.com/precise64.box"
  end
end
EOS

  # Create file
  write_file('Vagrantfile', file_content)
end

Given(/^a shell file '(.*?)' with content of "(.*?)"$/) do |script_name, script_contents|

  file_content = <<EOS
#!/bin/sh -e
#{script_contents}
EOS

  # Create file
  write_file(script_name, file_content)
end

Given(/^a Vagrantfile with no adam\.provision_url$/) do
  file_content = <<EOS
require 'vagrant-adam'

Vagrant.configure("2") do |config|
  config.vm.define :ubuntu do |ubuntu|
    ubuntu.vm.box = "precise64"
    ubuntu.vm.box_url = "http://files.vagrantup.com/precise64.box"
  end
end
EOS

  # Create file
  write_file('Vagrantfile', file_content)
end

Given(/^the environment variable (.+) is nil$/) do |variable|
  set_env(variable, nil)
end

Given(/^the environment variable (.+) is "(.+)"$/) do |variable, value|
  set_env(variable, value)
end

Given(/^the Vagrant box is already running$/) do
  run_simple('bundle exec vagrant up')
end

Given(/^the provision output should contain "(.*?)"$/) do |expected_provision_output|
  run_simple('bundle exec vagrant provision')
  expect(output_from('bundle exec vagrant provision')).to include(expected_provision_output)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vagrant-adam-0.5.0a features/step_definitions/steps.rb
vagrant-adam-0.4.0a features/step_definitions/steps.rb
vagrant-adam-0.3.0a features/step_definitions/steps.rb
vagrant-adam-0.2.0a features/step_definitions/steps.rb