Skip to content

Commit

Permalink
Box collection reloads after downloading during CheckBox. [closes has…
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Dec 1, 2010
1 parent 0c5231e commit 331e084
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@
- Multiple NFS folders now work on linux. [GH-215]
- Add translation for state "stuck" which is very rare. [GH-218]
- virtualbox gem dependency minimum raised to 0.7.6 to verify FFI < 1.0.0 is used.
- Fix issue where box downloading from `vagrant up` didn't reload the box collection. [GH-229]

## 0.6.7 (November 3, 2010)

Expand Down
1 change: 1 addition & 0 deletions lib/vagrant/action/vm/check_box.rb
Expand Up @@ -16,6 +16,7 @@ def call(env)

env.ui.info I18n.t("vagrant.actions.vm.check_box.not_found", :name => box_name)
Vagrant::Box.add(env.env, box_name, box_url)
env["boxes"].reload!
end

@app.call(env)
Expand Down
4 changes: 1 addition & 3 deletions test/vagrant/action/vm/check_box_test.rb
Expand Up @@ -6,9 +6,6 @@ class CheckBoxVMActionTest < Test::Unit::TestCase
end

context "calling" do
setup do
end

should "raise error if box not specified" do
app, env = action_env(vagrant_env(vagrantfile(<<-vf)))
config.vm.box = nil
Expand Down Expand Up @@ -47,6 +44,7 @@ class CheckBoxVMActionTest < Test::Unit::TestCase
seq = sequence("seq")
env.env.boxes.expects(:find).returns(nil)
Vagrant::Box.expects(:add).with(env.env, env["config"].vm.box, env["config"].vm.box_url).in_sequence(seq)
env.env.boxes.expects(:reload!).in_sequence(seq)
app.expects(:call).with(env).once.in_sequence(seq)

assert_nothing_raised {
Expand Down

0 comments on commit 331e084

Please sign in to comment.