From 09846b30fe997e919bf96f6076d2ff0a0ddcc529 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Thu, 17 Jan 2019 15:42:47 -0800 Subject: [PATCH] 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. --- test/unit/vagrant/action/builder_test.rb | 12 +++++++++++ test/unit/vagrant/action/builtin/call_test.rb | 20 +++++++++++++++++++ test/unit/vagrant/action/runner_test.rb | 4 ++++ 3 files changed, 36 insertions(+) diff --git a/test/unit/vagrant/action/builder_test.rb b/test/unit/vagrant/action/builder_test.rb index c4f67a118..94f9d846a 100644 --- a/test/unit/vagrant/action/builder_test.rb +++ b/test/unit/vagrant/action/builder_test.rb @@ -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] diff --git a/test/unit/vagrant/action/builtin/call_test.rb b/test/unit/vagrant/action/builtin/call_test.rb index 43e910c25..b4779032c 100644 --- a/test/unit/vagrant/action/builtin/call_test.rb +++ b/test/unit/vagrant/action/builtin/call_test.rb @@ -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 diff --git a/test/unit/vagrant/action/runner_test.rb b/test/unit/vagrant/action/runner_test.rb index d0a18f46d..329d1032e 100644 --- a/test/unit/vagrant/action/runner_test.rb +++ b/test/unit/vagrant/action/runner_test.rb @@ -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