ecomdev-chefspec 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ecomdev-chefspec.gemspec +2 -1
- data/lib/ecomdev/chefspec/helpers/runner_proxy.rb +1 -1
- data/lib/ecomdev/chefspec/resource/matcher.rb +1 -1
- data/lib/ecomdev/chefspec/version.rb +1 -1
- data/spec/unit/helpers/runner_proxy_spec.rb +9 -9
- data/spec/unit/matcher_spec.rb +2 -2
- data/spec/unit/stub/include_recipe_spec.rb +1 -1
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18159ffc44304066b431e39382c800d964f142a4
|
4
|
+
data.tar.gz: 63f5183b7e02a24c02d2555d8b08659f8f1d582b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 154ddd0fa037720b6e4aaa9fe15e682aff6573c7e0ab7314068bd1e1fee10a3e2b21c9a32d4d7c84f2303f16ea5e3547d7bef1c03c72f91d00dc8609ac188f38
|
7
|
+
data.tar.gz: b227866df1cb1217556488f123ab23b44736ccea9ff3ab4da437663e7eb3e446c745b1da62bf906cf427a85d6f5accedb9d42db7931b876292408ff9cdc87267
|
data/ecomdev-chefspec.gemspec
CHANGED
@@ -18,7 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency 'chefspec', '~> 4.
|
21
|
+
spec.add_dependency 'chefspec', '~> 4.1'
|
22
|
+
spec.add_dependency 'chef', '11.16'
|
22
23
|
spec.add_dependency 'json'
|
23
24
|
spec.add_development_dependency "bundler", "~> 1.6"
|
24
25
|
spec.add_development_dependency "rake"
|
@@ -97,7 +97,7 @@ module EcomDev::ChefSpec::Helpers
|
|
97
97
|
return @target
|
98
98
|
end
|
99
99
|
block_args = nil
|
100
|
-
@target = ChefSpec::
|
100
|
+
@target = ChefSpec::SoloRunner.new(*@args) do |*args|
|
101
101
|
block_args = args
|
102
102
|
end
|
103
103
|
invoke_blocks(:initialize, :block, *block_args, &@constructor_block)
|
@@ -8,8 +8,8 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
|
|
8
8
|
it 'passes constructor options to original constructor' do
|
9
9
|
runner_proxy = described_class.new(platform: 'ubuntu')
|
10
10
|
|
11
|
-
expect_any_instance_of(ChefSpec::
|
12
|
-
allow_any_instance_of(ChefSpec::
|
11
|
+
expect_any_instance_of(ChefSpec::SoloRunner).to receive(:initialize).with({platform: 'ubuntu'}).and_call_original
|
12
|
+
allow_any_instance_of(ChefSpec::SoloRunner).to receive(:node).and_return('fake')
|
13
13
|
|
14
14
|
# Call node method of proxied object
|
15
15
|
expect(runner_proxy.node).to eq('fake')
|
@@ -70,7 +70,7 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
|
|
70
70
|
checker.called(self)
|
71
71
|
}
|
72
72
|
|
73
|
-
expect(checker).to receive(:called).with(instance_of(ChefSpec::
|
73
|
+
expect(checker).to receive(:called).with(instance_of(ChefSpec::SoloRunner)).exactly(1).times
|
74
74
|
|
75
75
|
runner_proxy.before(:node, true, &block)
|
76
76
|
runner_proxy.node
|
@@ -88,7 +88,7 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
|
|
88
88
|
|
89
89
|
expect(checker).to receive(:node).with(instance_of(Chef::Node)).exactly(1).times
|
90
90
|
expect(checker).to receive(:args).with(Array.new).exactly(1).times
|
91
|
-
expect(checker).to receive(:called).with(instance_of(ChefSpec::
|
91
|
+
expect(checker).to receive(:called).with(instance_of(ChefSpec::SoloRunner)).exactly(1).times
|
92
92
|
|
93
93
|
runner_proxy.after(:node, true, &block)
|
94
94
|
runner_proxy.node
|
@@ -108,7 +108,7 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
|
|
108
108
|
runner_proxy = described_class.new(&block_constructor)
|
109
109
|
|
110
110
|
expect(checker).to receive(:called).with(
|
111
|
-
instance_of(ChefSpec::
|
111
|
+
instance_of(ChefSpec::SoloRunner),
|
112
112
|
instance_of(Chef::Node)
|
113
113
|
).exactly(1).times
|
114
114
|
expect(checker).to receive(:called_constructor).with(
|
@@ -134,13 +134,13 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
|
|
134
134
|
runner_proxy = described_class.new
|
135
135
|
|
136
136
|
expect(checker).to receive(:called).with(
|
137
|
-
instance_of(ChefSpec::
|
137
|
+
instance_of(ChefSpec::SoloRunner)
|
138
138
|
).exactly(1).times
|
139
139
|
expect(checker).to receive(:called_converege).with(
|
140
140
|
instance_of(self.class)
|
141
141
|
).exactly(1).times
|
142
142
|
|
143
|
-
allow_any_instance_of(ChefSpec::
|
143
|
+
allow_any_instance_of(ChefSpec::SoloRunner).to receive(:converge).and_yield
|
144
144
|
runner_proxy.block(:initialize, true, &block)
|
145
145
|
runner_proxy.converge(&block_converge)
|
146
146
|
end
|
@@ -156,10 +156,10 @@ describe EcomDev::ChefSpec::Helpers::RunnerProxy do
|
|
156
156
|
|
157
157
|
expect(checker).to receive(:called).with(
|
158
158
|
instance_of(self.class),
|
159
|
-
instance_of(ChefSpec::
|
159
|
+
instance_of(ChefSpec::SoloRunner)
|
160
160
|
).exactly(1).times
|
161
161
|
|
162
|
-
allow_any_instance_of(ChefSpec::
|
162
|
+
allow_any_instance_of(ChefSpec::SoloRunner).to receive(:converge).and_yield
|
163
163
|
runner_proxy.block(:initialize, &block)
|
164
164
|
runner_proxy.converge
|
165
165
|
end
|
data/spec/unit/matcher_spec.rb
CHANGED
@@ -127,11 +127,11 @@ describe EcomDev::ChefSpec::Resource::Matcher do
|
|
127
127
|
expect(EcomDev::ChefSpec::Resource::Matcher::Helper.instance_methods).to contain_exactly(:create_test)
|
128
128
|
end
|
129
129
|
|
130
|
-
it 'should define runner method in ChefSpec::
|
130
|
+
it 'should define runner method in ChefSpec::SoloRunner 'do
|
131
131
|
described_class.runner(:test_resource)
|
132
132
|
described_class.instance.extend_api
|
133
133
|
|
134
|
-
expect(::ChefSpec
|
134
|
+
expect(::ChefSpec.matchers.keys).to include(:test_resource)
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
@@ -15,7 +15,7 @@ describe EcomDev::ChefSpec::Stub::IncludeRecipe do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
context 'when there is a described recipe' do
|
18
|
-
let (:runner) { ChefSpec::
|
18
|
+
let (:runner) { ChefSpec::SoloRunner.new }
|
19
19
|
let (:described_recipe) { 'test::test' }
|
20
20
|
|
21
21
|
it 'loaded recipes should be empty in the beginning' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecomdev-chefspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Chepurnyi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chefspec
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4.
|
19
|
+
version: '4.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4.
|
26
|
+
version: '4.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: chef
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '11.16'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '11.16'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: json
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
150
|
version: '0'
|
137
151
|
requirements: []
|
138
152
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.4.
|
153
|
+
rubygems_version: 2.4.1
|
140
154
|
signing_key:
|
141
155
|
specification_version: 4
|
142
156
|
summary: A collection of helpers for chef spec, to make easier writing recipe specs
|