Add the #action API to the provider plugin

This commit is contained in:
Mitchell Hashimoto 2012-07-14 17:04:06 -07:00
parent 3b82f2efc4
commit 436da57cc4
2 changed files with 17 additions and 0 deletions

View File

@ -5,6 +5,14 @@ module Vagrant
# is responsible for creating compute resources to match the needs
# of a Vagrant-configured system.
class Provider
# This should return an action callable for the given name.
#
# @param [Symbol] name Name of the action.
# @return [Object] A callable action sequence object, whether it
# is a proc, object, etc.
def action(name)
nil
end
end
end
end

View File

@ -0,0 +1,9 @@
require File.expand_path("../../../../base", __FILE__)
describe Vagrant::Plugin::V1::Provider do
let(:instance) { described_class.new }
it "should return nil by default for actions" do
instance.action(:whatever).should be_nil
end
end