diff --git a/test/unit/vagrant/machine_test.rb b/test/unit/vagrant/machine_test.rb index eaf33ba2d..06275f31c 100644 --- a/test/unit/vagrant/machine_test.rb +++ b/test/unit/vagrant/machine_test.rb @@ -160,6 +160,16 @@ describe Vagrant::Machine do foo.should == :bar end + it "should return the environment as a result" do + action_name = :up + callable = lambda { |env| env[:result] = "FOO" } + + provider.stub(:action).with(action_name).and_return(callable) + result = instance.action(action_name) + + result[:result].should == "FOO" + end + it "should raise an exception if the action is not implemented" do action_name = :up