Sha256: 368d8c5c7770a430b0d14d0095ec37a5a71226c47a3ba7b932a0e3956ce433d6

Contents?: true

Size: 765 Bytes

Versions: 89

Compression:

Stored size: 765 Bytes

Contents

require "test_helper"

class ValidateGeneralActionTest < Test::Unit::TestCase
  setup do
    @klass = Vagrant::Action::General::Validate
    @app, @env = action_env
  end

  should "initialize fine" do
    @klass.new(@app, @env)
  end

  should "validate and call up" do
    @instance = @klass.new(@app, @env)

    seq = sequence("seq")
    @env["config"].expects(:validate!).once.in_sequence(seq)
    @app.expects(:call).with(@env).once.in_sequence(seq)
    @instance.call(@env)
  end

  should "not validate if env says not to" do
    @env["validate"] = false
    @instance = @klass.new(@app, @env)

    seq = sequence("seq")
    @env["config"].expects(:validate!).never
    @app.expects(:call).with(@env).once.in_sequence(seq)
    @instance.call(@env)
  end
end

Version data entries

89 entries across 89 versions & 9 rubygems

Version Path
bmhatfield-vagrant-1.0.10 test/unit_legacy/vagrant/action/general/validate_test.rb
bmhatfield-vagrant-1.0.9 test/unit_legacy/vagrant/action/general/validate_test.rb
bmhatfield-vagrant-1.0.8 test/unit_legacy/vagrant/action/general/validate_test.rb
bmhatfield-vagrant-1.0.7 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-1.0.7 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-1.0.6 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-1.0.5 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-1.0.4 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-1.0.3 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-1.0.2 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-1.0.1 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-1.0.0 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-0.9.99.2 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-0.9.99.1 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-0.9.7 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-0.9.6 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-0.9.5 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-0.9.4 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-0.9.3 test/unit_legacy/vagrant/action/general/validate_test.rb
vagrantup-0.9.2 test/unit_legacy/vagrant/action/general/validate_test.rb