Module: RSpec::Puppet::ClassExampleGroup

Includes:
ManifestMatchers, Support
Defined in:
lib/rspec-puppet/example/class_example_group.rb

Instance Attribute Summary

Attributes included from Support

#adapter

Instance Method Summary collapse

Methods included from Support

#build_catalog, #build_catalog_without_cache, #build_code, #class_name, #environment, #escape_special_chars, #facts_hash, #find_pretend_platform, #guess_type_from_path, #import_str, #load_catalogue, #munge_facts, #node_params_hash, #nodename, #param_str, #param_str_from_hash, #post_cond, #pre_cond, #ref, #rspec_compatibility, #sanitise_resource_title, #server_facts_hash, #setup_puppet, #site_pp_str, #str_from_value, #stub_facts!, #stub_file_consts, #subject, #test_manifest, #trusted_facts_hash, #with_vardir

Methods included from GenericMatchers

#raise_error

Methods included from ManifestMatchers

#have_class_count, #have_resource_count, #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RSpec::Puppet::ManifestMatchers

Instance Method Details

#catalogueObject



6
7
8
# File 'lib/rspec-puppet/example/class_example_group.rb', line 6

def catalogue
  @catalogue ||= load_catalogue(:class)
end

#exported_resourcesObject



10
11
12
# File 'lib/rspec-puppet/example/class_example_group.rb', line 10

def exported_resources
  lambda { load_catalogue(:class, true) }
end

#rspec_puppet_cleanupObject



14
15
16
# File 'lib/rspec-puppet/example/class_example_group.rb', line 14

def rspec_puppet_cleanup
  @catalogue = nil
end