Sha256: 8732351a58c88496572df1d5ce338cf7f8d1a709c10626b0c7f79834cc422547

Contents?: true

Size: 901 Bytes

Versions: 13

Compression:

Stored size: 901 Bytes

Contents

require "test_helper"

class ConfigVagrantTest < Test::Unit::TestCase
  setup do
    @config = Vagrant::Config::VagrantConfig.new
  end

  context "validation" do
    setup do
      @config.dotfile_name = "foo"
      @config.home = "foo"
      @config.host = "foo"

      @errors = Vagrant::Config::ErrorRecorder.new
    end

    should "be valid with given set of values" do
      @config.validate(@errors)
      assert @errors.errors.empty?
    end

    should "be invalid with no dotfile" do
      @config.dotfile_name = nil

      @config.validate(@errors)
      assert !@errors.errors.empty?
    end

    should "be invalid with no home" do
      @config.home = nil

      @config.validate(@errors)
      assert !@errors.errors.empty?
    end

    should "be invalid with no host" do
      @config.host = nil

      @config.validate(@errors)
      assert !@errors.errors.empty?
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
vagrantup-0.6.9 test/vagrant/config/vagrant_test.rb
vagrantup-0.6.8 test/vagrant/config/vagrant_test.rb
vagrantup-0.6.7 test/vagrant/config/vagrant_test.rb
vagrantup-0.6.6 test/vagrant/config/vagrant_test.rb
vagrantup-0.6.5 test/vagrant/config/vagrant_test.rb
vagrantup-0.6.4 test/vagrant/config/vagrant_test.rb
vagrant-0.7.0.beta test/vagrant/config/vagrant_test.rb
vagrant-0.6.9 test/vagrant/config/vagrant_test.rb
vagrant-0.6.8 test/vagrant/config/vagrant_test.rb
vagrant-0.6.7 test/vagrant/config/vagrant_test.rb
vagrant-0.6.6 test/vagrant/config/vagrant_test.rb
vagrant-0.6.5 test/vagrant/config/vagrant_test.rb
vagrant-0.6.4 test/vagrant/config/vagrant_test.rb