Module: RSpec::Chef::Matchers

Included in:
DefineRecipeGroup
Defined in:
lib/rspec-chef/matchers/contain_resource.rb

Defined Under Namespace

Classes: ContainResource

Constant Summary collapse

CONTAIN_PATTERN =
/^contain_(.+)/

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



6
7
8
9
# File 'lib/rspec-chef/matchers/contain_resource.rb', line 6

def method_missing(method, *args, &block)
  return RSpec::Chef::Matchers::ContainResource.new(method, *args, &block) if method.to_s =~ CONTAIN_PATTERN
  super
end