test/vagrant/box_test.rb in vagrantup-0.6.3 vs test/vagrant/box_test.rb in vagrantup-0.6.4
- old
+ new
@@ -25,9 +25,17 @@
context "instance methods" do
setup do
@box = Vagrant::Box.new(vagrant_env, "foo")
end
+ should "raise an exception if a box exists with the name we're attempting to add" do
+ vagrant_box(@box.name)
+
+ assert_raises(Vagrant::Errors::BoxAlreadyExists) {
+ @box.add
+ }
+ end
+
should "execute the Add action when add is called" do
@box.env.actions.expects(:run).with(:box_add, { "box" => @box })
@box.add
end