Skip to content

Using provides with LWRPs fails #2552

@jaym

Description

@jaym

Modify spec/data/lwrp/resource/bar.rb to bo

provides 'lwrp_bar'
actions :pass_buck, :prepare_eyes, :watch_paint_dry

When it is loaded:

     Failure/Error: Chef::Resource::LWRPBase.build_from_file("lwrp", file, @run_context)
     NoMethodError:
       undefined method `split' for nil:NilClass
     # ./lib/chef/mixin/convert_to_class_name.rb:88:in `constantize'
     # ./lib/chef/resource.rb:788:in `provides'
     # ./spec/data/lwrp/resources/bar.rb:1:in `class_from_file'
     # ./lib/chef/mixin/from_file.rb:42:in `class_eval'
     # ./lib/chef/mixin/from_file.rb:42:in `class_from_file'
     # ./lib/chef/resource/lwrp_base.rb:51:in `build_from_file'
     # ./spec/unit/lwrp_spec.rb:271:in `block (4 levels) in <top (required)>'
     # ./spec/unit/lwrp_spec.rb:270:in `each'
     # ./spec/unit/lwrp_spec.rb:270:in `block (3 levels) in <top (required)>'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions