diff --git a/test/unit/vagrant/action/runner_test.rb b/test/unit/vagrant/action/runner_test.rb index 329d1032e..7ffc1d14e 100644 --- a/test/unit/vagrant/action/runner_test.rb +++ b/test/unit/vagrant/action/runner_test.rb @@ -40,6 +40,19 @@ describe Vagrant::Action::Runner do expect { instance.run(callable) }.to raise_error(Exception, "BOOM") end + it "should be able to use a Class as a callable with no name attribute" do + callable = Class.new do + def initialize(app, env) + end + + def call(env) + raise Exception, "BOOM" + end + end + + expect { instance.run(callable) }.to raise_error(Exception, "BOOM") + end + it "should return the resulting environment" do callable = lambda do |env| env[:data] = "value"