 d26e4f4127
			
		
	
	d26e4f4127
	
	
	
		
			
			This change refactors how the dependent libraries are loaded during unit tests, and load the libraries in the base spec_helper to avoid duplicate and redundant implementations. Change-Id: I1ea3c36b077b6c58dea2f4db73e1442610b4ffbc
		
			
				
	
	
		
			23 lines
		
	
	
		
			846 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			846 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # Load libraries here to simulate how they live together in a real puppet run (for provider unit tests)
 | |
| $LOAD_PATH.push(File.join(File.dirname(__FILE__), 'fixtures', 'modules', 'inifile', 'lib'))
 | |
| $LOAD_PATH.push(File.join(File.dirname(__FILE__), 'fixtures', 'modules', 'openstacklib', 'lib'))
 | |
| 
 | |
| require 'puppetlabs_spec_helper/module_spec_helper'
 | |
| require 'shared_examples'
 | |
| require 'webmock/rspec'
 | |
| require 'puppet-openstack_spec_helper/facts'
 | |
| 
 | |
| fixture_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures'))
 | |
| 
 | |
| RSpec.configure do |c|
 | |
|   c.alias_it_should_behave_like_to :it_configures, 'configures'
 | |
|   c.alias_it_should_behave_like_to :it_raises, 'raises'
 | |
| 
 | |
|   c.module_path = File.join(fixture_path, 'modules')
 | |
|   c.manifest_dir = File.join(fixture_path, 'manifests')
 | |
| 
 | |
|   c.mock_with :rspec
 | |
| end
 | |
| 
 | |
| at_exit { RSpec::Puppet::Coverage.report! }
 |