Skip to content

Commit f3a1706

Browse files
author
Morgan Haskel
committed
Merge pull request puppetlabs#593 from cmurphy/rspec-puppet-2
Testing updates
2 parents 4a96679 + 5ff3378 commit f3a1706

File tree

6 files changed

+24
-20
lines changed

6 files changed

+24
-20
lines changed

.sync.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
.travis.yml:
33
extras:
4-
- rvm: 1.9.3
5-
env: PUPPET_GEM_VERSION="~> 3.5" STRICT_VARIABLES="yes"
6-
- rvm: 2.0.0
7-
env: PUPPET_GEM_VERSION="~> 3.5" STRICT_VARIABLES="yes"
4+
- rvm: 1.8.7
5+
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
6+
- rvm: 1.8.7
7+
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
88
spec/spec_helper.rb:
99
unmanaged: true

.travis.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
---
2+
sudo: false
23
language: ruby
34
bundler_args: --without system_tests
45
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
56
matrix:
67
fast_finish: true
78
include:
8-
- rvm: 1.8.7
9-
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
10-
- rvm: 1.8.7
11-
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
129
- rvm: 1.9.3
10+
env: PUPPET_GEM_VERSION="~> 3.4.0"
11+
- rvm: 1.8.7
1312
env: PUPPET_GEM_VERSION="~> 3.0"
14-
- rvm: 2.0.0
13+
- rvm: 1.9.3
1514
env: PUPPET_GEM_VERSION="~> 3.0"
1615
- rvm: 1.9.3
17-
env: PUPPET_GEM_VERSION="~> 3.5" STRICT_VARIABLES="yes"
18-
- rvm: 2.0.0
19-
env: PUPPET_GEM_VERSION="~> 3.5" STRICT_VARIABLES="yes"
16+
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
17+
- rvm: 2.1.5
18+
env: PUPPET_GEM_VERSION="~> 3.0"
19+
- rvm: 2.1.5
20+
env: PUPPET_GEM_VERSION="~> 3.4.0"
21+
- rvm: 2.1.5
22+
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
23+
- rvm: 1.8.7
24+
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
25+
- rvm: 1.8.7
26+
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
2027
notifications:
2128
email: false

Gemfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
source ENV['GEM_SOURCE'] || "https://rubygems.org"
22

33
group :development, :unit_tests do
4-
gem 'rake', :require => false
54
gem 'rspec-core', '3.1.7', :require => false
6-
gem 'rspec-puppet', '~> 1.0', :require => false
75
gem 'puppetlabs_spec_helper', :require => false
8-
gem 'puppet-lint', :require => false
96
gem 'simplecov', :require => false
107
gem 'puppet_facts', :require => false
118
gem 'json', :require => false

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'puppetlabs_spec_helper/rake_tasks'
22
require 'puppet-lint/tasks/puppet-lint'
33

4-
PuppetLint.configuration.fail_on_warnings
4+
PuppetLint.configuration.fail_on_warnings = true
55
PuppetLint.configuration.send('relative')
66
PuppetLint.configuration.send('disable_80chars')
77
PuppetLint.configuration.send('disable_class_inherits_from_params_class')

spec/unit/defines/server/pg_hba_rule_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class { 'postgresql::server': }
110110
}
111111
end
112112
it 'should fail parsing when type is not valid' do
113-
expect {subject}.to raise_error(Puppet::Error,
113+
expect { catalogue }.to raise_error(Puppet::Error,
114114
/The type you specified \[invalid\] must be one of/)
115115
end
116116
end
@@ -134,7 +134,7 @@ class { 'postgresql::server': }
134134
end
135135

136136
it 'should fail parsing when auth_method is not valid' do
137-
expect {subject}.to raise_error(Puppet::Error,
137+
expect { catalogue }.to raise_error(Puppet::Error,
138138
/The auth_method you specified \[invalid\] must be one of/)
139139
end
140140
end
@@ -161,7 +161,7 @@ class { 'postgresql::server': }
161161
end
162162

163163
it 'should fail parsing when auth_method is not valid' do
164-
expect {subject}.to raise_error(Puppet::Error,
164+
expect { catalogue }.to raise_error(Puppet::Error,
165165
/The auth_method you specified \[peer\] must be one of: trust, reject, md5, sha1, password, gss, sspi, krb5, ident, ldap, radius, cert, pam/)
166166
end
167167
end

spec/unit/defines/server/pg_ident_rule_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class { 'postgresql::server': }
5959
}
6060
end
6161
it 'should fail because $manage_pg_ident_conf is false' do
62-
expect {subject}.to raise_error(Puppet::Error,
62+
expect { catalogue }.to raise_error(Puppet::Error,
6363
/postgresql::server::manage_pg_ident_conf has been disabled/)
6464
end
6565
end

0 commit comments

Comments
 (0)