Fixup action tests

This commit fixes up the action tests by adding a `name` field for all
the Action classes used within the various tests.
This commit is contained in:
Brian Cain 2019-01-17 15:42:47 -08:00
parent 5e4850a0d2
commit 09846b30fe
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
3 changed files with 36 additions and 0 deletions

View File

@ -22,6 +22,10 @@ describe Vagrant::Action::Builder do
@app = app
end
def self.name
"TestAction"
end
define_method(:call) do |env|
env[:data] << "#{data}_in"
@app.call(env)
@ -147,6 +151,10 @@ describe Vagrant::Action::Builder do
@app = app
end
def self.name
"TestAction"
end
define_method(:call) do |env|
env[:data] << "#{letter}1"
@app.call(env)
@ -266,6 +274,10 @@ describe Vagrant::Action::Builder do
@app = app
end
def self.name
"TestAction"
end
define_method(:call) do |env|
inner = described_klass.new
inner.use wrapper_proc[2]

View File

@ -10,6 +10,10 @@ describe Vagrant::Action::Builtin::Call do
@app = app
end
def self.name
"TestAction"
end
define_method(:call) do |env|
env[:data] << "#{data}_in"
@app.call(env)
@ -103,6 +107,10 @@ describe Vagrant::Action::Builtin::Call do
env[:arg] = arg
end
def self.name
"TestAction"
end
def call(env); end
end
@ -126,6 +134,10 @@ describe Vagrant::Action::Builtin::Call do
@env = env
end
def self.name
"TestAction"
end
def call(env)
@app.call(env)
end
@ -137,6 +149,10 @@ describe Vagrant::Action::Builtin::Call do
super
end
def self.name
"TestAction"
end
def recover(env)
env[:steps] << :recover_A
end
@ -148,6 +164,10 @@ describe Vagrant::Action::Builtin::Call do
super
end
def self.name
"TestAction"
end
def recover(env)
env[:steps] << :recover_B
end

View File

@ -28,6 +28,10 @@ describe Vagrant::Action::Runner do
def initialize(app, env)
end
def self.name
"TestAction"
end
def call(env)
raise Exception, "BOOM"
end