rspec-puppet 2.7.6 → 2.7.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fa9949d6cb9b79c951ecd504f85344d100a40e70
4
- data.tar.gz: 2571507918bf8e77cc750501c6b24b0da1731c01
2
+ SHA256:
3
+ metadata.gz: 909a2a49721eb2d5ec6b602b7ed0719be58639118b7eafb36aa7544bd5469325
4
+ data.tar.gz: 9896c8d795bed07b213ec0f945d7148cca442e53dda4601e0d4f4347d206ceae
5
5
  SHA512:
6
- metadata.gz: a31eda49f0aa0933c87a9b90fdbd704103690b8f230e9eca9b9c5b785a889db60a2ccbbcba7c3d468c24dcd15b554c5f2bf27f3423e4b6b50782d3854e12b9d9
7
- data.tar.gz: bc3107e48272088eb124c8cca18cee099c44d0541ef8ebc9a323c93b1b158294be4f48e409d1a10d50403534b761799f37300efeae22449cf9a927eac5539c44
6
+ metadata.gz: 96021d922ee0e740157652a840f6638d0e6e5a41c7b96b5db8302f2c467d5a073917f03f8042e6bd068252c03552b7ae64949079fc08bcd032e3ae69143fbd21
7
+ data.tar.gz: c408ba9b872f7a3dbd8a3766d40e7ad2ed1f0f4f1239a25a24d7f6196ec41164438bcc067689a71fb37a5b4dd741d444679bfcc43ed222cfc4d1448d5db9904b
@@ -2,6 +2,14 @@
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.7]
6
+
7
+ ### Fixed
8
+ * Fix the support for rspec-expectations >= 3.8.5.
9
+
10
+ ### Changed
11
+ * Remove the rspec-expectations dependency limit introduced in 2.7.6.
12
+
5
13
  ## [2.7.6]
6
14
 
7
15
  ### Changed
@@ -6,3 +6,4 @@ require 'rspec-puppet/matchers/count_generic'
6
6
  require 'rspec-puppet/matchers/dynamic_matchers'
7
7
  require 'rspec-puppet/matchers/type_matchers'
8
8
  require 'rspec-puppet/matchers/allow_value'
9
+ require 'rspec-puppet/matchers/raise_error'
@@ -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)
@@ -78,6 +78,14 @@ module RSpec::Puppet
78
78
  end
79
79
  end
80
80
 
81
+ def supports_block_expectations
82
+ true
83
+ end
84
+
85
+ def supports_value_expectations
86
+ true
87
+ end
88
+
81
89
  private
82
90
  def missing_dependencies?
83
91
  retval = false
@@ -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
@@ -22,6 +22,13 @@ module RSpec::Puppet
22
22
  end
23
23
  end
24
24
 
25
+ def supports_block_expectations
26
+ true
27
+ end
28
+
29
+ def supports_value_expectations
30
+ true
31
+ end
25
32
  end
26
33
 
27
34
  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
@@ -104,6 +104,14 @@ module RSpec::Puppet
104
104
  end
105
105
  end
106
106
 
107
+ def supports_block_expectations
108
+ true
109
+ end
110
+
111
+ def supports_value_expectations
112
+ true
113
+ end
114
+
107
115
  private
108
116
  def func_name
109
117
  @func_obj.func_name
@@ -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
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.6
4
+ version: 2.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Sharpe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-04 00:00:00.000000000 Z
11
+ date: 2019-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec-expectations
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "<"
32
- - !ruby/object:Gem::Version
33
- version: 3.8.5
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "<"
39
- - !ruby/object:Gem::Version
40
- version: 3.8.5
41
27
  description: RSpec tests for your Puppet manifests
42
28
  email: tim@sharpe.id.au
43
29
  executables:
@@ -71,6 +57,7 @@ files:
71
57
  - lib/rspec-puppet/matchers/dynamic_matchers.rb
72
58
  - lib/rspec-puppet/matchers/include_class.rb
73
59
  - lib/rspec-puppet/matchers/parameter_matcher.rb
60
+ - lib/rspec-puppet/matchers/raise_error.rb
74
61
  - lib/rspec-puppet/matchers/run.rb
75
62
  - lib/rspec-puppet/matchers/type_matchers.rb
76
63
  - lib/rspec-puppet/monkey_patches.rb
@@ -102,8 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
89
  - !ruby/object:Gem::Version
103
90
  version: '0'
104
91
  requirements: []
105
- rubyforge_project:
106
- rubygems_version: 2.6.14.4
92
+ rubygems_version: 3.0.3
107
93
  signing_key:
108
94
  specification_version: 4
109
95
  summary: RSpec tests for your Puppet manifests