rspec-puppet 2.7.5 → 2.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/lib/rspec-puppet/matchers.rb +1 -0
- data/lib/rspec-puppet/matchers/allow_value.rb +8 -0
- data/lib/rspec-puppet/matchers/compile.rb +8 -0
- data/lib/rspec-puppet/matchers/count_generic.rb +8 -0
- data/lib/rspec-puppet/matchers/create_generic.rb +8 -0
- data/lib/rspec-puppet/matchers/include_class.rb +7 -0
- data/lib/rspec-puppet/matchers/raise_error.rb +23 -0
- data/lib/rspec-puppet/matchers/run.rb +8 -0
- data/lib/rspec-puppet/monkey_patches.rb +10 -0
- data/lib/rspec-puppet/support.rb +7 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38af21b6f0c4e9fcfeb90c063d299c725fd80d63e6d74b44d0a6e6f937f6d955
|
4
|
+
data.tar.gz: 977523988ad9525e31c461040c33894e1cbd79c9180252f9521f8b8172ac111b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8145ad0c55a4c52f7032f67ea2f73dc7fb72f162c32214e8b3e5aa5bd69efe1bd0ded6c2e36cff165e2e8f51734e0f94017c74f07ad0ce3b1bbeca90463ad34
|
7
|
+
data.tar.gz: 149c839eb092309b0e3bb1be2c0887aed4dc0ebe8fb9ea2b4b5b562a797df8b39800486e24e181dc7d44abdddbe94bc9938978e0d5862e35fa73581203475545
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,35 @@
|
|
2
2
|
All notable changes to this project will be documented in this file. This
|
3
3
|
project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [2.7.10]
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
* Fix issues with removal of `default_env` method in Puppet 6.17.0.
|
9
|
+
|
10
|
+
## [2.7.9]
|
11
|
+
|
12
|
+
This release had unintended breaking changes and was withdrawn.
|
13
|
+
|
14
|
+
## [2.7.8]
|
15
|
+
|
16
|
+
### Fixed
|
17
|
+
* Fix cross-platform testing for Puppet >= 6.9.0 when there is no `ipaddress6`
|
18
|
+
fact defined.
|
19
|
+
|
20
|
+
## [2.7.7]
|
21
|
+
|
22
|
+
### Fixed
|
23
|
+
* Fix the support for rspec-expectations >= 3.8.5.
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
* Remove the rspec-expectations dependency limit introduced in 2.7.6.
|
27
|
+
|
28
|
+
## [2.7.6]
|
29
|
+
|
30
|
+
### Changed
|
31
|
+
* Limit rspec-expectations dependency to < 3.8.5 due to an incompatible
|
32
|
+
change.
|
33
|
+
|
5
34
|
## [2.7.5]
|
6
35
|
|
7
36
|
### Fixed
|
@@ -34,6 +34,14 @@ module RSpec::Puppet
|
|
34
34
|
def failure_message_when_negated
|
35
35
|
"expected that the type alias would not " + description + " but it does"
|
36
36
|
end
|
37
|
+
|
38
|
+
def supports_block_expectations
|
39
|
+
true
|
40
|
+
end
|
41
|
+
|
42
|
+
def supports_value_expectations
|
43
|
+
true
|
44
|
+
end
|
37
45
|
end
|
38
46
|
|
39
47
|
def allow_value(*values)
|
@@ -61,6 +61,14 @@ module RSpec::Puppet
|
|
61
61
|
"expected that the catalogue would not " + description + " but it does"
|
62
62
|
end
|
63
63
|
|
64
|
+
def supports_block_expectations
|
65
|
+
true
|
66
|
+
end
|
67
|
+
|
68
|
+
def supports_value_expectations
|
69
|
+
true
|
70
|
+
end
|
71
|
+
|
64
72
|
private
|
65
73
|
|
66
74
|
def referenced_type(type)
|
@@ -177,6 +177,14 @@ module RSpec::Puppet
|
|
177
177
|
true
|
178
178
|
end
|
179
179
|
|
180
|
+
def supports_block_expectations
|
181
|
+
true
|
182
|
+
end
|
183
|
+
|
184
|
+
def supports_value_expectations
|
185
|
+
true
|
186
|
+
end
|
187
|
+
|
180
188
|
def expected
|
181
189
|
@errors.map {|e| e.expected if e.respond_to?(:expected)}.compact.join("\n\n")
|
182
190
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module RSpec::Puppet
|
2
|
+
module GenericMatchers
|
3
|
+
# Due to significant code base depending on the
|
4
|
+
#
|
5
|
+
# is_expected.to raise_error Puppet::Error
|
6
|
+
#
|
7
|
+
# syntax, and removal of this syntax from RSpec, extend RSpec's built-in
|
8
|
+
# `raise_error` matcher to accept a value target, e.g. a subject defined
|
9
|
+
# as a lambda, e.g.:
|
10
|
+
#
|
11
|
+
# subject(:catalogue) { lambda { load_catalogue } }
|
12
|
+
#
|
13
|
+
class RaiseError < RSpec::Matchers::BuiltIn::RaiseError
|
14
|
+
def supports_value_expectations?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def raise_error(*args, &block)
|
20
|
+
RaiseError.new(*args, &block)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -132,6 +132,16 @@ module Puppet
|
|
132
132
|
end
|
133
133
|
|
134
134
|
module Util
|
135
|
+
# Fix for removal of default_env function
|
136
|
+
# Bug: https://github.com/rodjek/rspec-puppet/issues/796
|
137
|
+
# Upstream: https://github.com/puppetlabs/puppet/commit/94df3c1a3992d89b2d7d5db8a70373c135bdd86b
|
138
|
+
if !respond_to?(:default_env)
|
139
|
+
def default_env()
|
140
|
+
DEFAULT_ENV
|
141
|
+
end
|
142
|
+
module_function :default_env
|
143
|
+
end
|
144
|
+
|
135
145
|
if respond_to?(:get_env)
|
136
146
|
alias :old_get_env :get_env
|
137
147
|
module_function :old_get_env
|
data/lib/rspec-puppet/support.rb
CHANGED
@@ -4,6 +4,8 @@ require 'rspec-puppet/raw_string'
|
|
4
4
|
|
5
5
|
module RSpec::Puppet
|
6
6
|
module Support
|
7
|
+
include GenericMatchers
|
8
|
+
|
7
9
|
@@cache = RSpec::Puppet::Cache.new
|
8
10
|
|
9
11
|
def subject
|
@@ -224,10 +226,11 @@ module RSpec::Puppet
|
|
224
226
|
}
|
225
227
|
|
226
228
|
node_facts = {
|
227
|
-
'hostname'
|
228
|
-
'fqdn'
|
229
|
-
'domain'
|
230
|
-
'clientcert'
|
229
|
+
'hostname' => node.split('.').first,
|
230
|
+
'fqdn' => node,
|
231
|
+
'domain' => node.split('.', 2).last,
|
232
|
+
'clientcert' => node,
|
233
|
+
'ipaddress6' => 'FE80:0000:0000:0000:AAAA:AAAA:AAAA',
|
231
234
|
}
|
232
235
|
|
233
236
|
networking_facts = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Sharpe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- lib/rspec-puppet/matchers/dynamic_matchers.rb
|
58
58
|
- lib/rspec-puppet/matchers/include_class.rb
|
59
59
|
- lib/rspec-puppet/matchers/parameter_matcher.rb
|
60
|
+
- lib/rspec-puppet/matchers/raise_error.rb
|
60
61
|
- lib/rspec-puppet/matchers/run.rb
|
61
62
|
- lib/rspec-puppet/matchers/type_matchers.rb
|
62
63
|
- lib/rspec-puppet/monkey_patches.rb
|
@@ -88,8 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
89
|
- !ruby/object:Gem::Version
|
89
90
|
version: '0'
|
90
91
|
requirements: []
|
91
|
-
|
92
|
-
rubygems_version: 2.7.6.2
|
92
|
+
rubygems_version: 3.0.3
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: RSpec tests for your Puppet manifests
|