Sha256: 940a408bf7fa08ae686a92da415cbd2d1bc683db08b529e496d32a6eec13130a

Contents?: true

Size: 1.04 KB

Versions: 59

Compression:

Stored size: 1.04 KB

Contents

require File.expand_path("../base", __FILE__)

describe "vagrant init" do
  include_context "acceptance"

  it "creates a Vagrantfile in the working directory" do
    vagrantfile = environment.workdir.join("Vagrantfile")
    vagrantfile.exist?.should_not be, "Vagrantfile shouldn't exist initially"

    result = execute("vagrant", "init")
    result.should succeed
    vagrantfile.exist?.should be, "Vagrantfile should exist"
  end

  it "creates a Vagrantfile with the box set to the given argument" do
    vagrantfile = environment.workdir.join("Vagrantfile")

    result = execute("vagrant", "init", "foo")
    result.should succeed
    vagrantfile.read.should match(/config.vm.box = "foo"$/)
  end

  it "creates a Vagrantfile with the box URL set to the given argument" do
    vagrantfile = environment.workdir.join("Vagrantfile")

    result = execute("vagrant", "init", "foo", "bar")
    result.should succeed

    contents = vagrantfile.read
    contents.should match(/config.vm.box = "foo"$/)
    contents.should match(/config.vm.box_url = "bar"$/)
  end
end

Version data entries

59 entries across 59 versions & 11 rubygems

Version Path
tamtam-vagrant-reload-1.1.3 vendor/cache/vagrant-0ac2a8738841/test/acceptance/init_test.rb
tamtam-vagrant-reload-1.1.2 vendor/cache/vagrant-0ac2a8738841/test/acceptance/init_test.rb
tamtam-vagrant-reload-1.1.1 vendor/cache/vagrant-0ac2a8738841/test/acceptance/init_test.rb
tamtam-vagrant-reload-1.1 vendor/cache/vagrant-0ac2a8738841/test/acceptance/init_test.rb
bmhatfield-vagrant-1.0.10 test/acceptance/init_test.rb
bmhatfield-vagrant-1.0.9 test/acceptance/init_test.rb
tnargav-1.3.6 test/acceptance/init_test.rb
tnargav-1.3.3 test/acceptance/init_test.rb
bmhatfield-vagrant-1.0.8 test/acceptance/init_test.rb
vagrant-shell-0.2.9 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/test/acceptance/init_test.rb
tnargav-1.2.3 test/acceptance/init_test.rb
vagrant-shell-0.2.8 demo/templates/vendor/bundle/ruby/1.9.1/gems/tnargav-1.2.2/test/acceptance/init_test.rb
bmhatfield-vagrant-1.0.7 test/acceptance/init_test.rb
vagrant-shell-0.2.6 vendor/bundle/gems/tnargav-1.2.2/test/acceptance/init_test.rb
vagrant-shell-0.2.5 vendor/bundle/gems/tnargav-1.2.2/test/acceptance/init_test.rb
tnargav-1.2.2 test/acceptance/init_test.rb
vagrantup-1.1.3 test/acceptance/init_test.rb
vagrantup-1.1.2 test/acceptance/init_test.rb
vagrantup-1.1.1 test/acceptance/init_test.rb
vagrantup-1.1.0 test/acceptance/init_test.rb