Sha256: 6621c85a2340395c471c92161a97370d6452dbc2ea9265a63b9ec233fa2d1dca

Contents?: true

Size: 931 Bytes

Versions: 4

Compression:

Stored size: 931 Bytes

Contents

require "test_helper"

class BaseProvisionerTest < Test::Unit::TestCase
  should "include the util class so subclasses have access to it" do
    assert Vagrant::Provisioners::Base.include?(Vagrant::Util)
  end

  context "base instance" do
    setup do
      @env = Vagrant::Action::Environment.new(mock_environment)
      @base = Vagrant::Provisioners::Base.new(@env)
    end

    should "set the environment" do
      assert_equal @env.env, @base.env
    end

    should "return the VM which the provisioner is acting on" do
      assert_equal @env.env.vm, @base.vm
    end

    should "implement provision! which does nothing" do
      assert_nothing_raised do
        assert @base.respond_to?(:provision!)
        @base.provision!
      end
    end

    should "implement prepare which does nothing" do
      assert_nothing_raised do
        assert @base.respond_to?(:prepare)
        @base.prepare
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
vagrantup-0.5.4 test/vagrant/provisioners/base_test.rb
vagrantup-0.5.3 test/vagrant/provisioners/base_test.rb
vagrant-0.5.4 test/vagrant/provisioners/base_test.rb
vagrant-0.5.3 test/vagrant/provisioners/base_test.rb