vagrant/test/unit/support/shared/plugin_command_context.rb

12 lines
235 B
Ruby
Raw Normal View History

shared_context "command plugin helpers" do
def command_lambda(name, result)
lambda do
Class.new(Vagrant.plugin("2", "command")) do
define_method(:execute) do
result
end
end
end
end
end