diff --git a/.sync.yml b/.sync.yml index 66a03c6..ac83790 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,3 +1,9 @@ --- +.travis.yml: + extras: + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" spec/spec_helper.rb: unmanaged: true diff --git a/.travis.yml b/.travis.yml index 6cf8b00..d1a0d7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,28 @@ --- +sudo: false language: ruby bundler_args: --without system_tests script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" matrix: fast_finish: true include: + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 3.4.0" + - rvm: 1.8.7 + env: PUPPET_GEM_VERSION="~> 3.0" + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 3.0" + - rvm: 1.9.3 + env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes" + - rvm: 2.1.5 + env: PUPPET_GEM_VERSION="~> 3.0" + - rvm: 2.1.5 + env: PUPPET_GEM_VERSION="~> 3.4.0" + - rvm: 2.1.5 + env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes" - rvm: 1.8.7 env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - rvm: 1.8.7 env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" - - rvm: 1.9.3 - env: PUPPET_GEM_VERSION="~> 3.0" - - rvm: 2.0.0 - env: PUPPET_GEM_VERSION="~> 3.0" notifications: email: false diff --git a/Gemfile b/Gemfile index 62c5693..cc77f38 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,8 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org" group :development, :unit_tests do - gem 'rake', :require => false gem 'rspec-core', '3.1.7', :require => false - gem 'rspec-puppet', '~> 1.0', :require => false gem 'puppetlabs_spec_helper', :require => false - gem 'puppet-lint', :require => false gem 'simplecov', :require => false gem 'puppet_facts', :require => false gem 'json', :require => false diff --git a/spec/classes/mysql_server_spec.rb b/spec/classes/mysql_server_spec.rb index c7ea0ac..bc36fe0 100644 --- a/spec/classes/mysql_server_spec.rb +++ b/spec/classes/mysql_server_spec.rb @@ -110,7 +110,7 @@ describe 'mysql::server' do :max_queries_per_hour => nil, :max_updates_per_hour => nil, :max_user_connections => nil, - :password_hash => '' + :password_hash => nil )} end diff --git a/spec/defines/mysql_db_spec.rb b/spec/defines/mysql_db_spec.rb index a715608..7ff3b9c 100644 --- a/spec/defines/mysql_db_spec.rb +++ b/spec/defines/mysql_db_spec.rb @@ -16,7 +16,7 @@ describe 'mysql::db', :type => :define do it 'should report an error when ensure is not present or absent' do params.merge!({'ensure' => 'invalid_val'}) - expect { subject }.to raise_error(Puppet::Error, + expect { catalogue }.to raise_error(Puppet::Error, /invalid_val is not supported for ensure\. Allowed values are 'present' and 'absent'\./) end @@ -47,7 +47,7 @@ describe 'mysql::db', :type => :define do it 'should report an error if sql isn\'t a string or an array' do params.merge!({'sql' => {'foo' => 'test_sql', 'bar' => 'test_2_sql'}}) - expect { subject }.to raise_error(Puppet::Error, + expect { catalogue }.to raise_error(Puppet::Error, /\$sql must be either a string or an array\./) end