Sha256: b09e685797fbf6e230482c87e9776720fbd3d9f12e08e517d0d022528caae672

Contents?: true

Size: 624 Bytes

Versions: 40

Compression:

Stored size: 624 Bytes

Contents

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

describe Vagrant::Config do
  it "should not execute the proc on configuration" do
    described_class.run do
      raise Exception, "Failure."
    end
  end

  it "should capture configuration procs" do
    receiver = double()

    procs = described_class.capture_configures do
      described_class.run do
        receiver.hello!
      end
    end

    # Verify the structure of the result
    procs.should be_kind_of(Array)
    procs.length.should == 1

    # Verify that the proper proc was captured
    receiver.should_receive(:hello!).once
    procs[0].call
  end
end

Version data entries

40 entries across 40 versions & 6 rubygems

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