Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modulesync: rspec-puppet-facts updates #106

Merged
merged 1 commit into from
Sep 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ rvm:
- 2.0.0
- 2.1.5
env:
- PUPPET_VERSION=3.5
- PUPPET_VERSION=3.5 FUTURE_PARSER=yes
- PUPPET_VERSION=4.0
- PUPPET_VERSION=3.5 ONLY_OS=redhat-6-x86_64,centos-6-x86_64,redhat-7-x86_64,centos-7-x86_64
- PUPPET_VERSION=3.5 FUTURE_PARSER=yes ONLY_OS=redhat-6-x86_64,centos-6-x86_64,redhat-7-x86_64,centos-7-x86_64
- PUPPET_VERSION=4.0 ONLY_OS=redhat-6-x86_64,centos-6-x86_64,redhat-7-x86_64,centos-7-x86_64
matrix:
fast_finish: true
exclude:
# No support for Ruby 1.9.3 on Puppet 4.x
- rvm: 1.9.3
env: PUPPET_VERSION=4.0
env: PUPPET_VERSION=4.0 ONLY_OS=redhat-6-x86_64,centos-6-x86_64,redhat-7-x86_64,centos-7-x86_64
include:
# Only platforms left to support ruby 1.8.7
- rvm: 1.8.7
env: PUPPET_VERSION=3.5
env: PUPPET_VERSION=3.5 ONLY_OS=redhat-6-x86_64,centos-6-x86_64,redhat-7-x86_64,centos-7-x86_64
- rvm: 1.8.7
env: PUPPET_VERSION=3.5 FUTURE_PARSER=yes
# Only Puppet 4.x supports Ruby 2.2. Also limit the OS set we test Ruby 2.2 with.
- rvm: 2.2.3
env: PUPPET_VERSION=4.0
env: PUPPET_VERSION=4.0 ONLY_OS=redhat-6-x86_64,centos-6-x86_64,redhat-7-x86_64,centos-7-x86_64
# Only Puppet >= 4.4 supports Ruby 2.3. Also limit the OS set we test Ruby 2.3 with.
- rvm: 2.3.0
env: PUPPET_VERSION=4.4
env: PUPPET_VERSION=4.4 ONLY_OS=redhat-6-x86_64,centos-6-x86_64,redhat-7-x86_64,centos-7-x86_64
bundler_args: --without development
sudo: false
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '~> 3
if RUBY_VERSION.start_with? '1.8'
gem 'rake', '< 11'
gem 'rspec', '>= 3', '< 3.2'
gem 'rspec-puppet-facts', '< 1.4.0'
else
gem 'rake'
gem 'rspec', '~> 3.0'
gem 'rspec-puppet-facts', '>= 1.5'
end
gem 'rspec-puppet', '~> 2.3'
gem 'puppetlabs_spec_helper', '>= 0.8.0'
Expand All @@ -34,5 +32,6 @@ gem 'mime-types', '~> 1.0', {"platforms"=>["ruby_18"], "groups"=>["development"]
gem 'json', '~> 1.0', {"platforms"=>["ruby_18", "ruby_19"], "groups"=>["test"]}
gem 'json_pure', '~> 1.0', {"platforms"=>["ruby_18", "ruby_19"], "groups"=>["test"]}
gem 'metadata-json-lint'
gem 'rspec-puppet-facts', '>= 1.7'

# vim:ft=ruby
2 changes: 1 addition & 1 deletion spec/classes/certs_katello_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

describe 'certs::katello' do
let :facts do
on_supported_os['redhat-7-x86_64'].merge(:concat_basedir => '/tmp', :puppetversion => Puppet.version)
on_supported_os['redhat-7-x86_64']
end

context 'with parameters' do
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/certs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

context 'on redhat' do
let :facts do
on_supported_os['redhat-7-x86_64'].merge(:concat_basedir => '/tmp', :puppetversion => Puppet.version)
on_supported_os['redhat-7-x86_64']
end

it { should contain_class('certs::install') }
Expand Down
5 changes: 5 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
require 'rspec-puppet-facts'
include RspecPuppetFacts

add_custom_fact :concat_basedir, '/tmp'
add_custom_fact :mongodb_version, '2.4.14'
add_custom_fact :root_home, '/root'
add_custom_fact :puppetversion, Puppet.version

# Workaround for no method in rspec-puppet to pass undef through :params
class Undef
def inspect; 'undef'; end
Expand Down