test_launcher 2.19.1 → 2.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d1cea86b871cfd55f6a1d7a3390d5dc9e8417de
4
- data.tar.gz: c38d40a89c9c4699b77ee0731b152bcd9b89a05b
3
+ metadata.gz: 017ac5a09f32c03998d5cdb68d599400e27cfb04
4
+ data.tar.gz: 2168a5a5cb13ca67279c4c03666b6aeb0529449f
5
5
  SHA512:
6
- metadata.gz: 1047fcb1c44a83debd18da19e0a64b2f78d5ba2a87d017f67495d73db80aa6199f5d4d42b009b10c43eb225b80d540bd23b6b76a5c38e7ea6d4fdde45c354c3d
7
- data.tar.gz: 99ce91ee9646982ea07dc5ea933c489e671515732a81f1125fd9f5127f73a4cfe9c2a4cd8f0a31a0d7552a74185beb654f97723ea9274660d6d2b178e6bcad02
6
+ metadata.gz: 0f2c3c95245f9a959819840149c062731943d557a94efefa164d2b29079a2ae359276e58750e671b389a7c2f0b9ec7a5ed7d31f7c7886d7e8adf9c57c9eb796a
7
+ data.tar.gz: eefc60ad5e7eaf9f8a46495b2bbf9fec044feed800a01454a314aefe02f715407ccd2f33875123ec087bf99b5a9485b979dfc3d7afce28d0d5a68b7281c54f75
@@ -7,51 +7,18 @@ require "test_launcher/cli/request"
7
7
  module TestLauncher
8
8
  module CLI
9
9
  class MultiFrameworkQuery < Struct.new(:cli_options)
10
- @@mutex = Mutex.new
11
-
12
10
  def command
13
- # do them all at the same time!
14
- @count = cli_options.frameworks.count
15
- @finished = 0
16
- @value = nil
17
- @now = Time.now.to_f
18
- @generic_default = nil
19
-
20
- cli_options.frameworks.each do |framework|
21
- Thread.new do
22
- finder = Queries::CommandFinder.new(request_for(framework))
23
- ex = nil
24
-
25
- begin
26
- val = finder.generic_search
27
- rescue => e
28
- ex = e
29
- end
30
-
31
- @@mutex.synchronize do
32
- @finished += 1
33
-
34
- if framework == Frameworks::Generic
35
- @generic_default = val
36
- else
37
- if ex && !@exception
38
- @exception = ex
39
- elsif val && !@value
40
- @value = val
41
- end
42
- end
43
- end
44
- end
45
- end
46
-
47
- while (@finished < @count && !@value && !@exception) do
48
- sleep(0.05)
11
+ command = nil
12
+ command_finders.each do |command_finder|
13
+ command = command_finder.generic_search
14
+ break if command
49
15
  end
16
+ command
17
+ end
50
18
 
51
- if @exception
52
- raise @exception
53
- else
54
- @value || @generic_default
19
+ def command_finders
20
+ cli_options.frameworks.map do |framework|
21
+ Queries::CommandFinder.new(request_for(framework))
55
22
  end
56
23
  end
57
24
 
@@ -80,9 +47,7 @@ module TestLauncher
80
47
 
81
48
  if options.rerun
82
49
  shell.reexec
83
- elsif result = MultiFrameworkQuery.new(options).command
84
- result.fetch(:notifies, []).each {|n| shell.notify(n)}
85
- command = result.fetch(:command)
50
+ elsif command = MultiFrameworkQuery.new(options).command
86
51
  command = yield(command) if block_given?
87
52
  if command
88
53
  shell.exec(command)
@@ -51,7 +51,7 @@ module TestLauncher
51
51
 
52
52
  class Runner < Base::Runner
53
53
  def by_line_number(test_case)
54
- %{cd #{test_case.app_root} && bundle exec rspec #{test_case.file}:#{test_case.line_number}}
54
+ %{cd #{test_case.app_root} && #{test_case.runner} #{test_case.file}:#{test_case.line_number}}
55
55
  end
56
56
 
57
57
  def single_example(test_case, **_)
@@ -64,11 +64,11 @@ module TestLauncher
64
64
  end
65
65
 
66
66
  def multiple_examples_same_root(test_cases)
67
- %{cd #{test_cases.first.app_root} && bundle exec rspec #{test_cases.map(&:file).join(" ")} --example #{Shellwords.escape(test_cases.first.example)}}
67
+ %{cd #{test_cases.first.app_root} && #{test_cases.first.runner} #{test_cases.map(&:file).join(" ")} --example #{Shellwords.escape(test_cases.first.example)}}
68
68
  end
69
69
 
70
70
  def one_or_more_files(test_cases)
71
- %{cd #{test_cases.first.app_root} && bundle exec rspec #{test_cases.map(&:file).join(" ")}}
71
+ %{cd #{test_cases.first.app_root} && #{test_cases.first.runner} #{test_cases.map(&:file).join(" ")}}
72
72
  end
73
73
  end
74
74
 
@@ -76,6 +76,16 @@ module TestLauncher
76
76
  def test_root_dir_name
77
77
  "spec"
78
78
  end
79
+
80
+ def runner
81
+ @runner ||= begin
82
+ if File.exist?(File.join(app_root, "bin/rspec"))
83
+ "bin/rspec"
84
+ else
85
+ "bundle exec rspec"
86
+ end
87
+ end
88
+ end
79
89
  end
80
90
  end
81
91
  end
@@ -117,18 +117,12 @@ module TestLauncher
117
117
  if test_cases.empty?
118
118
  shell.warn("Could not identify file: #{request.search_string}")
119
119
  elsif test_cases.size == 1
120
- {
121
- notifies: ["Found 1 example in 1 file."],
122
- command: runner.single_example(test_cases.first)
123
- }
120
+ shell.notify("Found 1 example in 1 file.")
121
+ runner.single_example(test_cases.first)
124
122
  else
125
- {
126
- notifies: [
127
- "Found #{pluralize(test_cases.size, "example")} in #{pluralize(file_count, "file")}.",
128
- "Running most recently edited. Run with '--all' to run all the tests."
129
- ],
130
- command: runner.single_example(most_recently_edited_test_case)
131
- }
123
+ shell.notify "Found #{pluralize(test_cases.size, "example")} in #{pluralize(file_count, "file")}."
124
+ shell.notify "Running most recently edited. Run with '--all' to run all the tests."
125
+ runner.single_example(most_recently_edited_test_case)
132
126
  end
133
127
  end
134
128
 
@@ -150,9 +144,7 @@ module TestLauncher
150
144
  class RerunQuery < BaseQuery
151
145
  def command
152
146
  if File.exists?("/tmp/test_launcher__last_run")
153
- {
154
- command: File.read("/tmp/test_launcher__last_run").chomp
155
- }
147
+ File.read("/tmp/test_launcher__last_run").chomp
156
148
  end
157
149
  end
158
150
  end
@@ -162,10 +154,8 @@ module TestLauncher
162
154
  return unless request.search_string.include?(" ")
163
155
  return if test_cases.empty?
164
156
 
165
- {
166
- notifies: ["Found #{pluralize(file_count, "file")}."],
167
- command: runner.multiple_files(test_cases)
168
- }
157
+ shell.notify("Found #{pluralize(file_count, "file")}.")
158
+ runner.multiple_files(test_cases)
169
159
  end
170
160
 
171
161
  def test_cases
@@ -204,24 +194,15 @@ module TestLauncher
204
194
  return if test_cases.empty?
205
195
 
206
196
  if one_file?
207
- {
208
- notifies: ["Found #{pluralize(file_count, "file")}."],
209
- command: runner.single_file(test_cases.first)
210
- }
197
+ shell.notify "Found #{pluralize(file_count, "file")}."
198
+ runner.single_file(test_cases.first)
211
199
  elsif request.run_all?
212
- {
213
- notifies: ["Found #{pluralize(file_count, "file")}."],
214
- command: runner.multiple_files(test_cases)
215
- }
200
+ shell.notify "Found #{pluralize(file_count, "file")}."
201
+ runner.multiple_files(test_cases)
216
202
  else
217
- {
218
- notifies: [
219
- "Found #{pluralize(file_count, "file")}.",
220
- "Running most recently edited. Run with '--all' to run all the tests.",
221
-
222
- ],
223
- command: runner.single_file(most_recently_edited_test_case)
224
- }
203
+ shell.notify "Found #{pluralize(file_count, "file")}."
204
+ shell.notify "Running most recently edited. Run with '--all' to run all the tests."
205
+ runner.single_file(most_recently_edited_test_case)
225
206
  end
226
207
  end
227
208
 
@@ -241,28 +222,18 @@ module TestLauncher
241
222
  return if test_cases.empty?
242
223
 
243
224
  if one_example?
244
- {
245
- notifies: ["Found 1 example in 1 file."],
246
- command: runner.single_example(test_cases.first)
247
- }
225
+ shell.notify("Found 1 example in 1 file.")
226
+ runner.single_example(test_cases.first)
248
227
  elsif one_file?
249
- {
250
- notifies: ["Found #{test_cases.size} examples in 1 file."],
251
- command: runner.multiple_examples_same_file(test_cases) # it will regex with the query
252
- }
228
+ shell.notify("Found #{test_cases.size} examples in 1 file.")
229
+ runner.multiple_examples_same_file(test_cases) # it will regex with the query
253
230
  elsif request.run_all?
254
- {
255
- notifies: ["Found #{pluralize(test_cases.size, "example")} in #{pluralize(file_count, "file")}."],
256
- command: runner.multiple_examples(test_cases)
257
- }
231
+ shell.notify "Found #{pluralize(test_cases.size, "example")} in #{pluralize(file_count, "file")}."
232
+ runner.multiple_examples(test_cases)
258
233
  else
259
- {
260
- notifies: [
261
- "Found #{pluralize(test_cases.size, "example")} in #{pluralize(file_count, "file")}.",
262
- "Running most recently edited. Run with '--all' to run all the tests.",
263
- ],
264
- command: runner.single_example(most_recently_edited_test_case) # let it regex the query
265
- }
234
+ shell.notify "Found #{pluralize(test_cases.size, "example")} in #{pluralize(file_count, "file")}."
235
+ shell.notify "Running most recently edited. Run with '--all' to run all the tests."
236
+ runner.single_example(most_recently_edited_test_case) # let it regex the query
266
237
  end
267
238
  end
268
239
 
@@ -293,20 +264,14 @@ module TestLauncher
293
264
  return if test_cases.empty?
294
265
 
295
266
  if one_example?
296
- {
297
- notifies: ["Found 1 example in 1 file."],
298
- command: runner.single_example(test_cases.first)
299
- }
267
+ shell.notify("Found 1 example in 1 file.")
268
+ runner.single_example(test_cases.first)
300
269
  elsif one_file?
301
- {
302
- notifies: ["Found #{test_cases.size} examples in 1 file."],
303
- command: runner.multiple_examples_same_file(test_cases) # it will regex with the query
304
- }
270
+ shell.notify("Found #{test_cases.size} examples in 1 file.")
271
+ runner.multiple_examples_same_file(test_cases) # it will regex with the query
305
272
  else
306
- {
307
- notifies: ["Found #{pluralize(test_cases.size, "example")} in #{pluralize(file_count, "file")}."],
308
- command: runner.multiple_examples(test_cases)
309
- }
273
+ shell.notify "Found #{pluralize(test_cases.size, "example")} in #{pluralize(file_count, "file")}."
274
+ runner.multiple_examples(test_cases)
310
275
  end
311
276
  end
312
277
 
@@ -341,23 +306,15 @@ module TestLauncher
341
306
  return if test_cases.empty?
342
307
 
343
308
  if one_file?
344
- {
345
- notifies: ["Found #{pluralize(file_count, "file")}."],
346
- command: runner.single_file(test_cases.first)
347
- }
309
+ shell.notify "Found #{pluralize(file_count, "file")}."
310
+ runner.single_file(test_cases.first)
348
311
  elsif request.run_all?
349
- {
350
- notifies: ["Found #{pluralize(file_count, "file")}."],
351
- command: runner.multiple_files(test_cases)
352
- }
312
+ shell.notify "Found #{pluralize(file_count, "file")}."
313
+ runner.multiple_files(test_cases)
353
314
  else
354
- {
355
- notifies: [
356
- "Found #{pluralize(file_count, "file")}.",
357
- "Running most recently edited. Run with '--all' to run all the tests.",
358
- ],
359
- command: runner.single_file(most_recently_edited_test_case)
360
- }
315
+ shell.notify "Found #{pluralize(file_count, "file")}."
316
+ shell.notify "Running most recently edited. Run with '--all' to run all the tests."
317
+ runner.single_file(most_recently_edited_test_case)
361
318
  end
362
319
  end
363
320
 
@@ -400,18 +357,12 @@ module TestLauncher
400
357
  return unless test_cases.any?
401
358
 
402
359
  if one_file?
403
- {
404
- notifies: ["Found #{pluralize(file_count, "file")}."],
405
- command: runner.by_line_number(test_cases.first)
406
- }
360
+ shell.notify "Found #{pluralize(file_count, "file")}."
361
+ runner.by_line_number(test_cases.first)
407
362
  else
408
- {
409
- notifies: [
410
- "Found #{pluralize(file_count, "file")}.",
411
- "Cannot run all tests with --all because test frameworks don't accept multiple file/lines combos."
412
- ],
413
- command: runner.by_line_number(most_recently_edited_test_case)
414
- }
363
+ shell.notify "Found #{pluralize(file_count, "file")}."
364
+ shell.notify "Cannot run all tests with --all because test frameworks don't accept multiple file/lines combos."
365
+ runner.by_line_number(most_recently_edited_test_case)
415
366
  end
416
367
  end
417
368
 
@@ -1,3 +1,3 @@
1
1
  module TestLauncher
2
- VERSION = "2.19.1"
2
+ VERSION = "2.20.0"
3
3
  end
@@ -15,7 +15,8 @@ module TestLauncher
15
15
  test_case = MockTestCase.new(
16
16
  example: "example_name",
17
17
  app_root: "app_root",
18
- file: "file"
18
+ file: "file",
19
+ runner: "bundle exec rspec"
19
20
  )
20
21
  assert_equal "cd app_root && bundle exec rspec file --example example_name", Runner.new.single_example(test_case)
21
22
  end
@@ -24,7 +25,8 @@ module TestLauncher
24
25
  test_case = MockTestCase.new(
25
26
  example: "this is it's name :(",
26
27
  app_root: "app_root",
27
- file: "file"
28
+ file: "file",
29
+ runner: "bundle exec rspec"
28
30
  )
29
31
  assert_equal "cd app_root && bundle exec rspec file --example this\\ is\\ it\\'s\\ name\\ :\\(", Runner.new.single_example(test_case)
30
32
  end
@@ -35,12 +37,14 @@ module TestLauncher
35
37
  MockTestCase.new(
36
38
  example: "example_name",
37
39
  app_root: "app_root",
38
- file: "file"
40
+ file: "file",
41
+ runner: "bundle exec rspec"
39
42
  ),
40
43
  MockTestCase.new(
41
44
  example: "example_name",
42
45
  app_root: "app_root",
43
- file: "file"
46
+ file: "file",
47
+ runner: "bundle exec rspec"
44
48
  )
45
49
  ]
46
50
  assert_equal "cd app_root && bundle exec rspec file --example example_name", Runner.new.multiple_examples_same_file(test_cases)
@@ -50,7 +54,8 @@ module TestLauncher
50
54
  test_case = MockTestCase.new(
51
55
  example: "example_name",
52
56
  app_root: "app_root",
53
- file: "file"
57
+ file: "file",
58
+ runner: "bundle exec rspec"
54
59
  )
55
60
  assert_equal "cd app_root && bundle exec rspec file", Runner.new.single_file(test_case)
56
61
  end
@@ -60,15 +65,17 @@ module TestLauncher
60
65
  MockTestCase.new(
61
66
  example: "example_name",
62
67
  app_root: "app_root",
63
- file: "file_1"
68
+ file: "file_1",
69
+ runner: "bin/rspec"
64
70
  ),
65
71
  MockTestCase.new(
66
72
  example: "example_name",
67
73
  app_root: "app_root",
68
- file: "file_2"
74
+ file: "file_2",
75
+ runner: "bin/rspec"
69
76
  )
70
77
  ]
71
- assert_equal "cd app_root && bundle exec rspec file_1 file_2", Runner.new.one_or_more_files(test_cases)
78
+ assert_equal "cd app_root && bin/rspec file_1 file_2", Runner.new.one_or_more_files(test_cases)
72
79
  end
73
80
  end
74
81
  end
@@ -106,7 +106,7 @@ module TestLauncher
106
106
 
107
107
  command = ExampleNameQuery.new(request, default_command_finder).command
108
108
 
109
- assert_equal "single_example file_1_test.rb one_example", command[:command]
109
+ assert_equal "single_example file_1_test.rb one_example", command
110
110
  end
111
111
 
112
112
  def test_command__one_example_found__notifies
@@ -120,9 +120,9 @@ module TestLauncher
120
120
  command = ExampleNameQuery.new(request, default_command_finder).command
121
121
 
122
122
  messages = [
123
- "Found 1 example in 1 file.",
123
+ ["Found 1 example in 1 file."],
124
124
  ]
125
- assert_equal messages, command[:notifies]
125
+ assert_equal messages, default_shell.recall(:notify)
126
126
  end
127
127
 
128
128
  def test_command__multiple_examples__one_file
@@ -135,7 +135,7 @@ module TestLauncher
135
135
 
136
136
  command = ExampleNameQuery.new(request, default_command_finder).command
137
137
 
138
- assert_equal "multiple_examples_same_file file_1_test.rb same_file", command[:command]
138
+ assert_equal "multiple_examples_same_file file_1_test.rb same_file", command
139
139
  end
140
140
 
141
141
  def test_command__multiple_examples__one_file__notifies
@@ -149,9 +149,9 @@ module TestLauncher
149
149
  command = ExampleNameQuery.new(request, default_command_finder).command
150
150
 
151
151
  messages = [
152
- "Found 2 examples in 1 file.",
152
+ ["Found 2 examples in 1 file."],
153
153
  ]
154
- assert_equal messages, command[:notifies]
154
+ assert_equal messages, default_shell.recall(:notify)
155
155
  end
156
156
 
157
157
  def test_command__multiple_examples__multiple_files__no_all
@@ -165,7 +165,7 @@ module TestLauncher
165
165
 
166
166
  command = ExampleNameQuery.new(request, default_command_finder).command
167
167
 
168
- assert_equal "single_example file_2_test.rb different_files", command[:command]
168
+ assert_equal "single_example file_2_test.rb different_files", command
169
169
  end
170
170
 
171
171
  def test_command__multiple_examples__multiple_files__no_all__notifies
@@ -180,10 +180,10 @@ module TestLauncher
180
180
  command = ExampleNameQuery.new(request, default_command_finder).command
181
181
 
182
182
  messages = [
183
- "Found 2 examples in 2 files.",
184
- "Running most recently edited. Run with '--all' to run all the tests.",
183
+ ["Found 2 examples in 2 files."],
184
+ ["Running most recently edited. Run with '--all' to run all the tests."],
185
185
  ]
186
- assert_equal messages, command[:notifies]
186
+ assert_equal messages, default_shell.recall(:notify)
187
187
  end
188
188
 
189
189
  def test_command__multiple_examples__multiple_files__all
@@ -197,7 +197,7 @@ module TestLauncher
197
197
 
198
198
  command = ExampleNameQuery.new(request, default_command_finder).command
199
199
 
200
- assert_equal "multiple_examples file_1_test.rb file_2_test.rb", command[:command]
200
+ assert_equal "multiple_examples file_1_test.rb file_2_test.rb", command
201
201
  end
202
202
 
203
203
  def test_command__multiple_examples__multiple_files__all__notifies
@@ -212,9 +212,9 @@ module TestLauncher
212
212
  command = ExampleNameQuery.new(request, default_command_finder).command
213
213
 
214
214
  messages = [
215
- "Found 2 examples in 2 files.",
215
+ ["Found 2 examples in 2 files."],
216
216
  ]
217
- assert_equal messages, command[:notifies]
217
+ assert_equal messages, default_shell.recall(:notify)
218
218
  end
219
219
  end
220
220
  end
@@ -105,7 +105,7 @@ module TestLauncher
105
105
 
106
106
  command = FullRegexQuery.new(request, default_command_finder).command
107
107
 
108
- assert_equal "single_file single_test.rb", command[:command]
108
+ assert_equal "single_file single_test.rb", command
109
109
  end
110
110
 
111
111
  def test_command__multiple_matches_same_file
@@ -118,7 +118,7 @@ module TestLauncher
118
118
 
119
119
  command = FullRegexQuery.new(request, default_command_finder).command
120
120
 
121
- assert_equal "single_file multiple_matches_1_test.rb", command[:command]
121
+ assert_equal "single_file multiple_matches_1_test.rb", command
122
122
  end
123
123
 
124
124
  def test_command__multiple_matches_different_files__no_all
@@ -132,7 +132,7 @@ module TestLauncher
132
132
 
133
133
  command = FullRegexQuery.new(request, default_command_finder).command
134
134
 
135
- assert_equal "single_file multiple_matches_2_test.rb", command[:command]
135
+ assert_equal "single_file multiple_matches_2_test.rb", command
136
136
  end
137
137
 
138
138
  def test_command__multiple_matches_different_files__all
@@ -146,7 +146,7 @@ module TestLauncher
146
146
 
147
147
  command = FullRegexQuery.new(request, default_command_finder).command
148
148
 
149
- assert_equal "multiple_files multiple_matches_1_test.rb multiple_matches_2_test.rb", command[:command]
149
+ assert_equal "multiple_files multiple_matches_1_test.rb multiple_matches_2_test.rb", command
150
150
  end
151
151
  end
152
152
  end
@@ -84,7 +84,7 @@ module TestLauncher
84
84
 
85
85
  assert_equal [[whole_file_test_case]], default_runner.recall(:by_line_number)
86
86
 
87
- assert_equal "by_line_number_return", command[:command]
87
+ assert_equal "by_line_number_return", command
88
88
  end
89
89
 
90
90
 
@@ -100,7 +100,7 @@ module TestLauncher
100
100
 
101
101
  assert_equal [[example_name_test_case]], default_runner.recall(:by_line_number)
102
102
 
103
- assert_equal "by_line_number_return", command[:command]
103
+ assert_equal "by_line_number_return", command
104
104
  end
105
105
  end
106
106
  end
@@ -107,7 +107,7 @@ module TestLauncher
107
107
  command = MultiPathQuery.new(request, default_command_finder).command
108
108
 
109
109
  assert_equal [[[file_1_test_case, file_2_test_case]]], default_runner.recall(:multiple_files)
110
- assert_equal "multiple_files_return", command[:command]
110
+ assert_equal "multiple_files_return", command
111
111
  end
112
112
 
113
113
  def test_command__finds_files_for_2_of_2_terms__extra_files_found
@@ -119,7 +119,7 @@ module TestLauncher
119
119
  )
120
120
  command = MultiPathQuery.new(request, default_command_finder).command
121
121
  assert_equal [[[file_1_test_case, file_3_test_case, file_4_test_case]]], default_runner.recall(:multiple_files)
122
- assert_equal "multiple_files_return", command[:command]
122
+ assert_equal "multiple_files_return", command
123
123
  end
124
124
  end
125
125
  end
@@ -92,7 +92,7 @@ module TestLauncher
92
92
  command = PathQuery.new(request, default_command_finder).command
93
93
 
94
94
  assert_equal [[normal_test_case]], default_runner.recall(:single_file)
95
- assert_equal "single_file_return", command[:command]
95
+ assert_equal "single_file_return", command
96
96
  end
97
97
 
98
98
  def test_command__one_file_found__has_correct_test_case
@@ -120,7 +120,7 @@ module TestLauncher
120
120
 
121
121
  command = PathQuery.new(request, default_command_finder).command
122
122
 
123
- assert_equal ["Found 1 file."], command[:notifies]
123
+ assert_equal [["Found 1 file."]], default_shell.recall(:notify)
124
124
  end
125
125
 
126
126
  def test_command__multiple_files_found__no_all__runs_single_file
@@ -135,7 +135,7 @@ module TestLauncher
135
135
  command = PathQuery.new(request, default_command_finder).command
136
136
 
137
137
  assert_equal [[new_test_case]], default_runner.recall(:single_file)
138
- assert_equal "single_file_return", command[:command]
138
+ assert_equal "single_file_return", command
139
139
  end
140
140
 
141
141
  def test_command__multiple_files_found__no_all__notifies
@@ -150,10 +150,10 @@ module TestLauncher
150
150
  command = PathQuery.new(request, default_command_finder).command
151
151
 
152
152
  messages = [
153
- "Found 3 files.",
154
- "Running most recently edited. Run with '--all' to run all the tests."
153
+ ["Found 3 files."],
154
+ ["Running most recently edited. Run with '--all' to run all the tests."]
155
155
  ]
156
- assert_equal messages, command[:notifies]
156
+ assert_equal messages, default_shell.recall(:notify)
157
157
  end
158
158
 
159
159
  def test_command__multiple_files_found__all__runs_single_file
@@ -168,7 +168,7 @@ module TestLauncher
168
168
  command = PathQuery.new(request, default_command_finder).command
169
169
 
170
170
  assert_equal [[[old_test_case, older_test_case, new_test_case]]], default_runner.recall(:multiple_files)
171
- assert_equal "multiple_files_return", command[:command]
171
+ assert_equal "multiple_files_return", command
172
172
  end
173
173
 
174
174
  def test_command__multiple_files_found__all__notifies
@@ -183,9 +183,9 @@ module TestLauncher
183
183
  command = PathQuery.new(request, default_command_finder).command
184
184
 
185
185
  messages = [
186
- "Found 3 files."
186
+ ["Found 3 files."]
187
187
  ]
188
- assert_equal messages, command[:notifies]
188
+ assert_equal messages, default_shell.recall(:notify)
189
189
  end
190
190
  end
191
191
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.19.1
4
+ version: 2.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Kinnecom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-24 00:00:00.000000000 Z
11
+ date: 2018-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler