Class: Dockerspec::EngineList
- Inherits:
-
Object
- Object
- Dockerspec::EngineList
- Defined in:
- lib/dockerspec/engine_list.rb
Overview
Manages the list of testing engines to use.
Constant Summary collapse
- NO_ENGINES_MESSAGE =
A message with description on how to avoid the error when you forget specifying the testing engine you want to use.
"\nRemember to include the Test Engine you want to use.\n\nFor example, to use Serverspec:\n\n require 'dockerspec/serverspec'\n\n EOE\n.freeze\n"
Instance Method Summary collapse
-
#before_running(*args) ⇒ Object
Setups all the engines one by one.
-
#initialize(runner) ⇒ Dockerspec::EngineList
constructor
Constructs the list of engines.
-
#restore(*args) ⇒ Object
Restores all the engines one by one.
-
#when_container_ready(*args) ⇒ Object
Notify the engines that the container to test is selected and ready.
-
#when_running(*args) ⇒ Object
Saves all the engines one by one.
Constructor Details
#initialize(runner) ⇒ Dockerspec::EngineList
Constructs the list of engines.
Initializes all the selected engines.
58 59 60 61 62 63 |
# File 'lib/dockerspec/engine_list.rb', line 58 def initialize(runner) engine_classes = Configuration.engines @engines = engine_classes.map { |engine_class| engine_class.new(runner) } assert_engines! end |
Instance Method Details
#before_running(*args) ⇒ Object
Setups all the engines one by one.
74 75 76 |
# File 'lib/dockerspec/engine_list.rb', line 74 def before_running(*args) call_engines_method(:before_running, *args) end |
#restore(*args) ⇒ Object
Restores all the engines one by one.
114 115 116 |
# File 'lib/dockerspec/engine_list.rb', line 114 def restore(*args) call_engines_method(:restore, *args) end |
#when_container_ready(*args) ⇒ Object
Notify the engines that the container to test is selected and ready.
methods.
88 89 90 |
# File 'lib/dockerspec/engine_list.rb', line 88 def when_container_ready(*args) call_engines_method(:when_container_ready, *args) end |
#when_running(*args) ⇒ Object
Saves all the engines one by one.
101 102 103 |
# File 'lib/dockerspec/engine_list.rb', line 101 def when_running(*args) call_engines_method(:when_running, *args) end |