test-kitchen 1.14.1 → 1.14.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/Berksfile +1 -1
  3. data/CHANGELOG.md +7 -0
  4. data/Gemfile +1 -1
  5. data/Guardfile +5 -5
  6. data/Rakefile +5 -5
  7. data/bin/kitchen +1 -1
  8. data/features/step_definitions/gem_steps.rb +6 -6
  9. data/features/support/env.rb +6 -7
  10. data/lib/kitchen.rb +5 -7
  11. data/lib/kitchen/base64_stream.rb +2 -8
  12. data/lib/kitchen/cli.rb +76 -80
  13. data/lib/kitchen/collection.rb +0 -2
  14. data/lib/kitchen/color.rb +7 -9
  15. data/lib/kitchen/command.rb +0 -4
  16. data/lib/kitchen/command/action.rb +0 -3
  17. data/lib/kitchen/command/console.rb +4 -7
  18. data/lib/kitchen/command/diagnose.rb +7 -14
  19. data/lib/kitchen/command/driver_discover.rb +1 -4
  20. data/lib/kitchen/command/exec.rb +0 -3
  21. data/lib/kitchen/command/list.rb +9 -12
  22. data/lib/kitchen/command/login.rb +0 -3
  23. data/lib/kitchen/command/package.rb +0 -3
  24. data/lib/kitchen/command/sink.rb +6 -9
  25. data/lib/kitchen/command/test.rb +1 -4
  26. data/lib/kitchen/config.rb +25 -27
  27. data/lib/kitchen/configurable.rb +26 -31
  28. data/lib/kitchen/data_munger.rb +34 -36
  29. data/lib/kitchen/diagnostic.rb +5 -7
  30. data/lib/kitchen/driver.rb +3 -5
  31. data/lib/kitchen/driver/base.rb +0 -3
  32. data/lib/kitchen/driver/dummy.rb +0 -3
  33. data/lib/kitchen/driver/proxy.rb +0 -3
  34. data/lib/kitchen/driver/ssh_base.rb +13 -16
  35. data/lib/kitchen/errors.rb +11 -16
  36. data/lib/kitchen/generator/driver_create.rb +18 -21
  37. data/lib/kitchen/generator/init.rb +21 -26
  38. data/lib/kitchen/instance.rb +19 -23
  39. data/lib/kitchen/lazy_hash.rb +1 -2
  40. data/lib/kitchen/loader/yaml.rb +22 -25
  41. data/lib/kitchen/logger.rb +9 -14
  42. data/lib/kitchen/logging.rb +0 -3
  43. data/lib/kitchen/login_command.rb +0 -2
  44. data/lib/kitchen/metadata_chopper.rb +0 -2
  45. data/lib/kitchen/platform.rb +1 -3
  46. data/lib/kitchen/provisioner.rb +3 -5
  47. data/lib/kitchen/provisioner/base.rb +2 -5
  48. data/lib/kitchen/provisioner/chef/berkshelf.rb +1 -5
  49. data/lib/kitchen/provisioner/chef/common_sandbox.rb +24 -29
  50. data/lib/kitchen/provisioner/chef/librarian.rb +2 -6
  51. data/lib/kitchen/provisioner/chef/policyfile.rb +4 -8
  52. data/lib/kitchen/provisioner/chef_apply.rb +14 -17
  53. data/lib/kitchen/provisioner/chef_base.rb +43 -46
  54. data/lib/kitchen/provisioner/chef_solo.rb +10 -13
  55. data/lib/kitchen/provisioner/chef_zero.rb +22 -29
  56. data/lib/kitchen/provisioner/dummy.rb +0 -3
  57. data/lib/kitchen/provisioner/shell.rb +6 -9
  58. data/lib/kitchen/rake_tasks.rb +4 -6
  59. data/lib/kitchen/shell_out.rb +3 -5
  60. data/lib/kitchen/ssh.rb +16 -22
  61. data/lib/kitchen/state_file.rb +3 -5
  62. data/lib/kitchen/suite.rb +0 -2
  63. data/lib/kitchen/thor_tasks.rb +2 -4
  64. data/lib/kitchen/transport.rb +3 -5
  65. data/lib/kitchen/transport/base.rb +1 -7
  66. data/lib/kitchen/transport/dummy.rb +0 -4
  67. data/lib/kitchen/transport/ssh.rb +41 -47
  68. data/lib/kitchen/transport/winrm.rb +41 -40
  69. data/lib/kitchen/util.rb +1 -3
  70. data/lib/kitchen/verifier.rb +3 -5
  71. data/lib/kitchen/verifier/base.rb +2 -5
  72. data/lib/kitchen/verifier/busser.rb +24 -24
  73. data/lib/kitchen/verifier/dummy.rb +0 -3
  74. data/lib/kitchen/verifier/shell.rb +1 -3
  75. data/lib/kitchen/version.rb +1 -1
  76. data/lib/vendor/hash_recursive_merge.rb +0 -2
  77. data/spec/kitchen/base64_stream_spec.rb +3 -6
  78. data/spec/kitchen/cli_spec.rb +0 -2
  79. data/spec/kitchen/collection_spec.rb +4 -8
  80. data/spec/kitchen/color_spec.rb +0 -3
  81. data/spec/kitchen/config_spec.rb +91 -106
  82. data/spec/kitchen/configurable_spec.rb +44 -76
  83. data/spec/kitchen/data_munger_spec.rb +1178 -1247
  84. data/spec/kitchen/diagnostic_spec.rb +37 -38
  85. data/spec/kitchen/driver/base_spec.rb +7 -14
  86. data/spec/kitchen/driver/dummy_spec.rb +1 -7
  87. data/spec/kitchen/driver/proxy_spec.rb +2 -7
  88. data/spec/kitchen/driver/ssh_base_spec.rb +128 -149
  89. data/spec/kitchen/driver_spec.rb +7 -13
  90. data/spec/kitchen/errors_spec.rb +50 -60
  91. data/spec/kitchen/instance_spec.rb +217 -294
  92. data/spec/kitchen/lazy_hash_spec.rb +14 -18
  93. data/spec/kitchen/loader/yaml_spec.rb +201 -227
  94. data/spec/kitchen/logger_spec.rb +7 -15
  95. data/spec/kitchen/logging_spec.rb +1 -4
  96. data/spec/kitchen/login_command_spec.rb +3 -4
  97. data/spec/kitchen/metadata_chopper_spec.rb +0 -3
  98. data/spec/kitchen/platform_spec.rb +31 -32
  99. data/spec/kitchen/provisioner/base_spec.rb +22 -41
  100. data/spec/kitchen/provisioner/chef/policyfile_spec.rb +15 -15
  101. data/spec/kitchen/provisioner/chef_apply_spec.rb +8 -13
  102. data/spec/kitchen/provisioner/chef_base_spec.rb +150 -182
  103. data/spec/kitchen/provisioner/chef_solo_spec.rb +58 -72
  104. data/spec/kitchen/provisioner/chef_zero_spec.rb +99 -125
  105. data/spec/kitchen/provisioner/dummy_spec.rb +8 -11
  106. data/spec/kitchen/provisioner/shell_spec.rb +86 -103
  107. data/spec/kitchen/provisioner_spec.rb +5 -11
  108. data/spec/kitchen/shell_out_spec.rb +15 -19
  109. data/spec/kitchen/ssh_spec.rb +16 -35
  110. data/spec/kitchen/state_file_spec.rb +6 -11
  111. data/spec/kitchen/suite_spec.rb +5 -6
  112. data/spec/kitchen/transport/base_spec.rb +6 -14
  113. data/spec/kitchen/transport/ssh_spec.rb +39 -64
  114. data/spec/kitchen/transport/winrm_spec.rb +99 -127
  115. data/spec/kitchen/transport_spec.rb +7 -13
  116. data/spec/kitchen/util_spec.rb +17 -26
  117. data/spec/kitchen/verifier/base_spec.rb +24 -40
  118. data/spec/kitchen/verifier/busser_spec.rb +38 -68
  119. data/spec/kitchen/verifier/dummy_spec.rb +8 -11
  120. data/spec/kitchen/verifier/shell_spec.rb +14 -17
  121. data/spec/kitchen/verifier_spec.rb +7 -13
  122. data/spec/kitchen_spec.rb +4 -6
  123. data/spec/spec_helper.rb +1 -1
  124. data/spec/support/powershell_max_size_spec.rb +1 -2
  125. data/support/chef-client-zero.rb +3 -4
  126. data/test-kitchen.gemspec +4 -6
  127. metadata +9 -9
@@ -23,7 +23,6 @@ require "kitchen"
23
23
 
24
24
  module Kitchen
25
25
  describe CLI do
26
-
27
26
  let(:cli) { CLI.new }
28
27
 
29
28
  before do
@@ -51,6 +50,5 @@ module Kitchen
51
50
  assert_equal false, cli.config.log_overwrite
52
51
  end
53
52
  end
54
-
55
53
  end
56
54
  end
@@ -22,11 +22,10 @@ require "ostruct"
22
22
  require "kitchen/collection"
23
23
 
24
24
  describe Kitchen::Collection do
25
-
26
25
  let(:collection) do
27
26
  Kitchen::Collection.new([
28
- obj("one"), obj("two", "a"), obj("two", "b"), obj("three")
29
- ])
27
+ obj("one"), obj("two", "a"), obj("two", "b"), obj("three")
28
+ ])
30
29
  end
31
30
 
32
31
  it "transparently wraps an Array" do
@@ -34,7 +33,6 @@ describe Kitchen::Collection do
34
33
  end
35
34
 
36
35
  describe "#get" do
37
-
38
36
  it "returns a single object by its name" do
39
37
  collection.get("three").must_equal obj("three")
40
38
  end
@@ -49,7 +47,6 @@ describe Kitchen::Collection do
49
47
  end
50
48
 
51
49
  describe "#get_all" do
52
-
53
50
  it "returns a Collection of objects whose name matches the regex" do
54
51
  result = collection.get_all(/(one|three)/)
55
52
  result.size.must_equal 2
@@ -66,15 +63,14 @@ describe Kitchen::Collection do
66
63
  end
67
64
 
68
65
  describe "#as_name" do
69
-
70
66
  it "returns an Array of names as strings" do
71
- collection.as_names.must_equal %w[one two two three]
67
+ collection.as_names.must_equal %w{one two two three}
72
68
  end
73
69
  end
74
70
 
75
71
  private
76
72
 
77
73
  def obj(name, extra = nil)
78
- OpenStruct.new(:name => name, :extra => extra)
74
+ OpenStruct.new(name: name, extra: extra)
79
75
  end
80
76
  end
@@ -21,9 +21,7 @@ require_relative "../spec_helper"
21
21
  require "kitchen/color"
22
22
 
23
23
  describe Kitchen::Color do
24
-
25
24
  describe ".escape" do
26
-
27
25
  it "returns an empty string if name is nil" do
28
26
  Kitchen::Color.escape(nil).must_equal ""
29
27
  end
@@ -42,7 +40,6 @@ describe Kitchen::Color do
42
40
  end
43
41
 
44
42
  describe ".colorize" do
45
-
46
43
  it "returns an ansi escaped string colored yellow" do
47
44
  Kitchen::Color.colorize("hello", :yellow).must_equal "\e[33mhello\e[0m"
48
45
  end
@@ -32,16 +32,13 @@ require "kitchen/util"
32
32
  require "kitchen/verifier"
33
33
 
34
34
  module Kitchen
35
-
36
35
  class DummyLoader
37
-
38
36
  attr_writer :data
39
37
 
40
38
  def read
41
- @data || Hash.new
39
+ @data || {}
42
40
  end
43
41
  end
44
-
45
42
  end
46
43
 
47
44
  describe Kitchen::Config do
@@ -55,34 +52,33 @@ describe Kitchen::Config do
55
52
 
56
53
  let(:opts) do
57
54
  {
58
- :loader => loader,
59
- :kitchen_root => "/tmp/that/place",
60
- :log_root => "/tmp/logs",
61
- :test_base_path => "/testing/yo",
62
- :log_level => :debug,
63
- :log_overwrite => false,
64
- :colorize => false
55
+ loader: loader,
56
+ kitchen_root: "/tmp/that/place",
57
+ log_root: "/tmp/logs",
58
+ test_base_path: "/testing/yo",
59
+ log_level: :debug,
60
+ log_overwrite: false,
61
+ colorize: false,
65
62
  }
66
63
  end
67
64
 
68
65
  let(:default_kitchen_config) do
69
66
  {
70
- :defaults => {
71
- :driver => "dummy",
72
- :provisioner => "chef_solo",
73
- :transport => "ssh",
74
- :verifier => "busser"
67
+ defaults: {
68
+ driver: "dummy",
69
+ provisioner: "chef_solo",
70
+ transport: "ssh",
71
+ verifier: "busser",
75
72
  },
76
- :kitchen_root => "/tmp/that/place",
77
- :test_base_path => "/testing/yo",
78
- :log_level => :debug,
79
- :log_overwrite => false,
80
- :colorize => false
73
+ kitchen_root: "/tmp/that/place",
74
+ test_base_path: "/testing/yo",
75
+ log_level: :debug,
76
+ log_overwrite: false,
77
+ colorize: false,
81
78
  }
82
79
  end
83
80
 
84
81
  describe "#loader" do
85
-
86
82
  it "returns its loader" do
87
83
  config.loader.must_equal loader
88
84
  end
@@ -95,7 +91,6 @@ describe Kitchen::Config do
95
91
  end
96
92
 
97
93
  describe "#kitchen_root" do
98
-
99
94
  it "returns its kitchen root" do
100
95
  config.kitchen_root.must_equal "/tmp/that/place"
101
96
  end
@@ -108,7 +103,6 @@ describe Kitchen::Config do
108
103
  end
109
104
 
110
105
  describe "#log_root" do
111
-
112
106
  it "returns its log root" do
113
107
  config.log_root.must_equal "/tmp/logs"
114
108
  end
@@ -121,7 +115,6 @@ describe Kitchen::Config do
121
115
  end
122
116
 
123
117
  describe "#test_base_path" do
124
-
125
118
  it "returns its base test path" do
126
119
  config.test_base_path.must_equal "/testing/yo"
127
120
  end
@@ -134,7 +127,6 @@ describe Kitchen::Config do
134
127
  end
135
128
 
136
129
  describe "#log_level" do
137
-
138
130
  it "returns its log level" do
139
131
  config.log_level.must_equal :debug
140
132
  end
@@ -147,7 +139,6 @@ describe Kitchen::Config do
147
139
  end
148
140
 
149
141
  describe "#log_overwrite" do
150
-
151
142
  it "returns its log level" do
152
143
  config.log_overwrite.must_equal false
153
144
  end
@@ -160,7 +151,6 @@ describe Kitchen::Config do
160
151
  end
161
152
 
162
153
  describe "#colorize" do
163
-
164
154
  it "returns its colorize" do
165
155
  config.colorize.must_equal false
166
156
  end
@@ -173,7 +163,6 @@ describe Kitchen::Config do
173
163
  end
174
164
 
175
165
  describe "#platforms" do
176
-
177
166
  before do
178
167
  Kitchen::DataMunger.stubs(:new).returns(munger)
179
168
  Kitchen::Platform.stubs(:new).returns("platform")
@@ -181,12 +170,12 @@ describe Kitchen::Config do
181
170
 
182
171
  let(:munger) do
183
172
  stub(
184
- :platform_data => [{ :one => "a" }, { :two => "b" }]
173
+ platform_data: [{ one: "a" }, { two: "b" }]
185
174
  )
186
175
  end
187
176
 
188
177
  it "loader loads data" do
189
- loader.expects(:read).returns(Hash.new)
178
+ loader.expects(:read).returns({})
190
179
 
191
180
  config.platforms
192
181
  end
@@ -194,10 +183,10 @@ describe Kitchen::Config do
194
183
  it "constructs a munger with loader data and defaults" do
195
184
  loader.stubs(:read).returns("datum")
196
185
 
197
- Kitchen::DataMunger.expects(:new).with { |data, kitchen_config|
186
+ Kitchen::DataMunger.expects(:new).with do |data, kitchen_config|
198
187
  data.must_equal "datum"
199
188
  kitchen_config.is_a?(Hash).must_equal true
200
- }.returns(munger)
189
+ end.returns(munger)
201
190
 
202
191
  config.platforms
203
192
  end
@@ -209,24 +198,23 @@ describe Kitchen::Config do
209
198
  end
210
199
 
211
200
  it "contructs Platform objects" do
212
- Kitchen::Platform.expects(:new).with(:one => "a")
213
- Kitchen::Platform.expects(:new).with(:two => "b")
201
+ Kitchen::Platform.expects(:new).with(one: "a")
202
+ Kitchen::Platform.expects(:new).with(two: "b")
214
203
 
215
204
  config.platforms
216
205
  end
217
206
 
218
207
  it "returns a Collection of platforms" do
219
- Kitchen::Platform.stubs(:new).
220
- with(:one => "a").returns(stub(:name => "one"))
221
- Kitchen::Platform.stubs(:new).
222
- with(:two => "b").returns(stub(:name => "two"))
208
+ Kitchen::Platform.stubs(:new)
209
+ .with(one: "a").returns(stub(name: "one"))
210
+ Kitchen::Platform.stubs(:new)
211
+ .with(two: "b").returns(stub(name: "two"))
223
212
 
224
- config.platforms.as_names.must_equal %w[one two]
213
+ config.platforms.as_names.must_equal %w{one two}
225
214
  end
226
215
  end
227
216
 
228
217
  describe "#suites" do
229
-
230
218
  before do
231
219
  Kitchen::DataMunger.stubs(:new).returns(munger)
232
220
  Kitchen::Suite.stubs(:new).returns("suite")
@@ -234,12 +222,12 @@ describe Kitchen::Config do
234
222
 
235
223
  let(:munger) do
236
224
  stub(
237
- :suite_data => [{ :one => "a" }, { :two => "b" }]
225
+ suite_data: [{ one: "a" }, { two: "b" }]
238
226
  )
239
227
  end
240
228
 
241
229
  it "loader loads data" do
242
- loader.expects(:read).returns(Hash.new)
230
+ loader.expects(:read).returns({})
243
231
 
244
232
  config.suites
245
233
  end
@@ -247,10 +235,10 @@ describe Kitchen::Config do
247
235
  it "constucts a munger with loader data and defaults" do
248
236
  loader.stubs(:read).returns("datum")
249
237
 
250
- Kitchen::DataMunger.expects(:new).with { |data, kitchen_config|
238
+ Kitchen::DataMunger.expects(:new).with do |data, kitchen_config|
251
239
  data.must_equal "datum"
252
240
  kitchen_config.is_a?(Hash).must_equal true
253
- }.returns(munger)
241
+ end.returns(munger)
254
242
 
255
243
  config.suites
256
244
  end
@@ -262,38 +250,37 @@ describe Kitchen::Config do
262
250
  end
263
251
 
264
252
  it "contructs Suite objects" do
265
- Kitchen::Suite.expects(:new).with(:one => "a")
266
- Kitchen::Suite.expects(:new).with(:two => "b")
253
+ Kitchen::Suite.expects(:new).with(one: "a")
254
+ Kitchen::Suite.expects(:new).with(two: "b")
267
255
 
268
256
  config.suites
269
257
  end
270
258
 
271
259
  it "returns a Collection of suites" do
272
- Kitchen::Suite.stubs(:new).
273
- with(:one => "a").returns(stub(:name => "one"))
274
- Kitchen::Suite.stubs(:new).
275
- with(:two => "b").returns(stub(:name => "two"))
260
+ Kitchen::Suite.stubs(:new)
261
+ .with(one: "a").returns(stub(name: "one"))
262
+ Kitchen::Suite.stubs(:new)
263
+ .with(two: "b").returns(stub(name: "two"))
276
264
 
277
- config.suites.as_names.must_equal %w[one two]
265
+ config.suites.as_names.must_equal %w{one two}
278
266
  end
279
267
  end
280
268
 
281
269
  describe "#instances" do
282
-
283
270
  let(:platforms) do
284
- [stub(:name => "unax")]
271
+ [stub(name: "unax")]
285
272
  end
286
273
 
287
274
  let(:suites) do
288
- [stub(:name => "tiny", :includes => [], :excludes => [])]
275
+ [stub(name: "tiny", includes: [], excludes: [])]
289
276
  end
290
277
 
291
278
  let(:munger) do
292
279
  stub(
293
- :driver_data_for => { "junk" => true },
294
- :provisioner_data_for => { "junk" => true },
295
- :transport_data_for => { "junk" => true },
296
- :verifier_data_for => { "junk" => true }
280
+ driver_data_for: { "junk" => true },
281
+ provisioner_data_for: { "junk" => true },
282
+ transport_data_for: { "junk" => true },
283
+ verifier_data_for: { "junk" => true }
297
284
  )
298
285
  end
299
286
 
@@ -312,41 +299,41 @@ describe Kitchen::Config do
312
299
  end
313
300
 
314
301
  it "constructs a Driver object" do
315
- munger.expects(:driver_data_for).with("tiny", "unax").
316
- returns(:name => "drivey", :datum => "lots")
302
+ munger.expects(:driver_data_for).with("tiny", "unax")
303
+ .returns(name: "drivey", datum: "lots")
317
304
  Kitchen::Driver.unstub(:for_plugin)
318
- Kitchen::Driver.expects(:for_plugin).
319
- with("drivey", :name => "drivey", :datum => "lots")
305
+ Kitchen::Driver.expects(:for_plugin)
306
+ .with("drivey", name: "drivey", datum: "lots")
320
307
 
321
308
  config.instances
322
309
  end
323
310
 
324
311
  it "constructs a Provisioner object" do
325
- munger.expects(:provisioner_data_for).with("tiny", "unax").
326
- returns(:name => "provey", :datum => "lots")
312
+ munger.expects(:provisioner_data_for).with("tiny", "unax")
313
+ .returns(name: "provey", datum: "lots")
327
314
  Kitchen::Provisioner.unstub(:for_plugin)
328
- Kitchen::Provisioner.expects(:for_plugin).
329
- with("provey", :name => "provey", :datum => "lots")
315
+ Kitchen::Provisioner.expects(:for_plugin)
316
+ .with("provey", name: "provey", datum: "lots")
330
317
 
331
318
  config.instances
332
319
  end
333
320
 
334
321
  it "constructs a Transport object" do
335
- munger.expects(:transport_data_for).with("tiny", "unax").
336
- returns(:name => "transey", :datum => "lots")
322
+ munger.expects(:transport_data_for).with("tiny", "unax")
323
+ .returns(name: "transey", datum: "lots")
337
324
  Kitchen::Transport.unstub(:for_plugin)
338
- Kitchen::Transport.expects(:for_plugin).
339
- with("transey", :name => "transey", :datum => "lots")
325
+ Kitchen::Transport.expects(:for_plugin)
326
+ .with("transey", name: "transey", datum: "lots")
340
327
 
341
328
  config.instances
342
329
  end
343
330
 
344
331
  it "constructs a Verifier object" do
345
- munger.expects(:verifier_data_for).with("tiny", "unax").
346
- returns(:name => "vervey", :datum => "lots")
332
+ munger.expects(:verifier_data_for).with("tiny", "unax")
333
+ .returns(name: "vervey", datum: "lots")
347
334
  Kitchen::Verifier.unstub(:for_plugin)
348
- Kitchen::Verifier.expects(:for_plugin).
349
- with("vervey", :name => "vervey", :datum => "lots")
335
+ Kitchen::Verifier.expects(:for_plugin)
336
+ .with("vervey", name: "vervey", datum: "lots")
350
337
 
351
338
  config.instances
352
339
  end
@@ -354,13 +341,13 @@ describe Kitchen::Config do
354
341
  it "constructs a Logger object" do
355
342
  Kitchen::Logger.unstub(:new)
356
343
  Kitchen::Logger.expects(:new).with(
357
- :stdout => STDOUT,
358
- :color => :cyan,
359
- :logdev => "/tmp/logs/tiny-unax.log",
360
- :log_overwrite => false,
361
- :level => 0,
362
- :progname => "tiny-unax",
363
- :colorize => false
344
+ stdout: STDOUT,
345
+ color: :cyan,
346
+ logdev: "/tmp/logs/tiny-unax.log",
347
+ log_overwrite: false,
348
+ level: 0,
349
+ progname: "tiny-unax",
350
+ colorize: false
364
351
  )
365
352
 
366
353
  config.instances
@@ -377,14 +364,14 @@ describe Kitchen::Config do
377
364
  Kitchen::Instance.unstub(:new)
378
365
 
379
366
  Kitchen::Instance.expects(:new).with(
380
- :driver => "driver",
381
- :logger => "logger",
382
- :suite => suites.first,
383
- :platform => platforms.first,
384
- :provisioner => "provisioner",
385
- :transport => "transport",
386
- :verifier => "verifier",
387
- :state_file => "state_file"
367
+ driver: "driver",
368
+ logger: "logger",
369
+ suite: suites.first,
370
+ platform: platforms.first,
371
+ provisioner: "provisioner",
372
+ transport: "transport",
373
+ verifier: "verifier",
374
+ state_file: "state_file"
388
375
  )
389
376
 
390
377
  config.instances
@@ -392,17 +379,16 @@ describe Kitchen::Config do
392
379
  end
393
380
 
394
381
  describe "using Suite#includes" do
395
-
396
382
  it "selects only platforms in a suite's includes array" do
397
383
  config.stubs(:platforms).returns([
398
- stub(:name => "good"),
399
- stub(:name => "nope"),
400
- stub(:name => "one")
401
- ])
384
+ stub(name: "good"),
385
+ stub(name: "nope"),
386
+ stub(name: "one"),
387
+ ])
402
388
  config.stubs(:suites).returns([
403
- stub(:name => "selecta", :includes => %w[good one], :excludes => []),
404
- stub(:name => "allem", :includes => [], :excludes => [])
405
- ])
389
+ stub(name: "selecta", includes: %w{good one}, excludes: []),
390
+ stub(name: "allem", includes: [], excludes: []),
391
+ ])
406
392
 
407
393
  config.instances.as_names.must_equal [
408
394
  "selecta-good", "selecta-one", "allem-good", "allem-nope", "allem-one"]
@@ -410,17 +396,16 @@ describe Kitchen::Config do
410
396
  end
411
397
 
412
398
  describe "using Suite#excludes" do
413
-
414
399
  it "selects only platforms in a suite's includes array" do
415
400
  config.stubs(:platforms).returns([
416
- stub(:name => "good"),
417
- stub(:name => "nope"),
418
- stub(:name => "one")
419
- ])
401
+ stub(name: "good"),
402
+ stub(name: "nope"),
403
+ stub(name: "one"),
404
+ ])
420
405
  config.stubs(:suites).returns([
421
- stub(:name => "selecta", :includes => [], :excludes => ["nope"]),
422
- stub(:name => "allem", :includes => [], :excludes => [])
423
- ])
406
+ stub(name: "selecta", includes: [], excludes: ["nope"]),
407
+ stub(name: "allem", includes: [], excludes: []),
408
+ ])
424
409
 
425
410
  config.instances.as_names.must_equal [
426
411
  "selecta-good", "selecta-one", "allem-good", "allem-nope", "allem-one"]