class Foodtaster::RSpec::ExampleMethods::ChefConfig

Attributes

json[RW]
run_list[RW]

Public Class Methods

new() click to toggle source
# File lib/foodtaster/rspec/example_methods.rb, line 34
def initialize
  @json = {}
  @run_list = []
end

Public Instance Methods

add_recipe(name) click to toggle source
# File lib/foodtaster/rspec/example_methods.rb, line 39
def add_recipe(name)
  name = "recipe[#{name}]" unless name =~ /^recipe\[(.+?)\]$/
  run_list << name
end
add_role(name) click to toggle source
# File lib/foodtaster/rspec/example_methods.rb, line 44
def add_role(name)
  name = "role[#{name}]" unless name =~ /^role\[(.+?)\]$/
  run_list << name
end
to_hash() click to toggle source
# File lib/foodtaster/rspec/example_methods.rb, line 49
def to_hash
  { json: json, run_list: run_list }
end