Class: Halite::SpecHelper::Runner
- Inherits:
-
ChefSpec::SoloRunner
- Object
- ChefSpec::SoloRunner
- Halite::SpecHelper::Runner
- Defined in:
- lib/halite/spec_helper/runner.rb
Overview
ChefSpec runner class with Halite customizations. This adds attribute options, Halite synthetic cookbook injection, and block-based recipes.
Instance Method Summary collapse
- #converge(*args, &block) ⇒ Object
-
#initialize(options = {}) ⇒ Runner
constructor
A new instance of Runner.
- #preload! ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Runner
Returns a new instance of Runner.
33 34 35 36 37 |
# File 'lib/halite/spec_helper/runner.rb', line 33 def initialize(={}) # Store the gemspec for later use @halite_gemspec = [:halite_gemspec] super end |
Instance Method Details
#converge(*args, &block) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/halite/spec_helper/runner.rb', line 42 def converge(*args, &block) super(*args) do |node| add_halite_cookbooks(node, @halite_gemspec) if @halite_gemspec block.call(node) if block end end |
#preload! ⇒ Object
39 40 |
# File 'lib/halite/spec_helper/runner.rb', line 39 def preload! end |