ruby - How to load attributes from a file to chefspec node -


i have following layout:

attributes/default.rb recipes/my_recipe.rb spec/unit/recipes/my_recipe_spec.rb 

in attributes files have lot of common settings likes

default['framework']['folder']['lib'] = '/usr/lib/fwrk' 

i use them in chefspec, like

it 'install lib if there changes'     lib_path = chef_run.node['framework']['folder']['lib']     puts(lib_path) end 

how can include file node solorunner/serverrunner?

run .converge() first , you'll see them in there. remember ever parameterize tests on same inputs on both sides, wouldn't useful test since doesn't check if value expected be.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

vue.js - Create hooks for automated testing -

Optimising Firebase database by automatically overwriting data -