Revision d19da48d
Added by Ewoud Kohl van Wijngaarden over 10 years ago
spec/classes/foreman_config_passenger_spec.rb | ||
---|---|---|
end
|
||
|
||
it do
|
||
should include_class('apache::ssl')
|
||
should include_class('passenger')
|
||
should_not include_class('::passenger::install::scl')
|
||
should contain_class('apache::ssl')
|
||
should contain_class('passenger')
|
||
should_not contain_class('::passenger::install::scl')
|
||
|
||
should contain_file('foreman_vhost').with({
|
||
:path => '/etc/httpd/conf.d/foreman.conf',
|
||
... | ... | |
end
|
||
|
||
it 'should include scl' do
|
||
should include_class('passenger::install::scl')
|
||
should contain_class('passenger::install::scl')
|
||
end
|
||
end
|
||
|
spec/classes/foreman_spec.rb | ||
---|---|---|
})
|
||
end
|
||
|
||
it { should include_class('foreman::install') }
|
||
it { should include_class('foreman::config') }
|
||
it { should include_class('foreman::database') }
|
||
it { should include_class('foreman::service') }
|
||
it { should contain_class('foreman::install') }
|
||
it { should contain_class('foreman::config') }
|
||
it { should contain_class('foreman::database') }
|
||
it { should contain_class('foreman::service') }
|
||
end
|
||
|
||
context 'on debian' do
|
||
... | ... | |
})
|
||
end
|
||
|
||
it { should include_class('foreman::install') }
|
||
it { should include_class('foreman::config') }
|
||
it { should include_class('foreman::database') }
|
||
it { should include_class('foreman::service') }
|
||
it { should contain_class('foreman::install') }
|
||
it { should contain_class('foreman::config') }
|
||
it { should contain_class('foreman::database') }
|
||
it { should contain_class('foreman::service') }
|
||
end
|
||
end
|
spec/spec_helper.rb | ||
---|---|---|
def static_fixture_path
|
||
File.join(File.dirname(__FILE__), 'static_fixtures')
|
||
end
|
||
|
||
RSpec.configure do |c|
|
||
c.module_path = File.join(fixture_path, 'modules')
|
||
c.manifest_dir = File.join(fixture_path, 'manifests')
|
||
c.mock_with :mocha
|
||
end
|
Also available in: Unified diff
Clean up tests
This replaces the deprecated include_class with contain_class and
removes the redundant rspec configuration.