acrmp/chefspec — pull request #141 by AndreyChernyh (2013-05-27 13:59:07+00:00)
Title: Fix ohai plugin reloader by providing dummy config

```
================================================================================
Recipe Compile Error in /Users/akhkharu/projects/chef/chef-rails-frontend/vendor/cookbooks/chef-rails-frontend/recipes/default.rb
================================================================================

TypeError
---------
can't convert nil into String

Cookbook Trace:
---------------
/Users/akhkharu/projects/chef/chef-rails-frontend/vendor/cookbooks/ohai/recipes/default.rb:51:in `read'
/Users/akhkharu/projects/chef/chef-rails-frontend/vendor/cookbooks/ohai/recipes/default.rb:51:in `from_file'
/Users/akhkharu/projects/chef/chef-rails-frontend/vendor/cookbooks/nginx/recipes/ohai_plugin.rb:39:in `from_file'
/Users/akhkharu/projects/chef/chef-rails-frontend/vendor/cookbooks/nginx/recipes/source.rb:40:in `from_file'
/Users/akhkharu/projects/chef/chef-rails-frontend/vendor/cookbooks/chef-rails-frontend/recipes/default.rb:1:in `from_file'
/Users/akhkharu/projects/chef/chef-rails-frontend/spec/default_spec.rb:5:in `block (2 levels) in '
/Users/akhkharu/projects/chef/chef-rails-frontend/spec/default_spec.rb:20:in `block (2 levels) in '

Relevant File Content:
----------------------
/Users/akhkharu/projects/chef/chef-rails-frontend/vendor/cookbooks/ohai/recipes/default.rb:

44: resource = ohai 'custom_plugins' do
45: action :nothing
46: end
47:
48: # only reload ohai if new plugins were dropped off OR
49: # node['ohai']['plugin_path'] does not exists in client.rb
50: if reload_ohai ||
51>> !(::IO.read(Chef::Config[:config_file]) =~ /Ohai::Config\[:plugin_path\]\s*<<\s*["']#{node['ohai']['plugin_path']}["']/)
52:
53: resource.run_action(:reload)
54: end
55:
```