spec_selector 0.1.5 → 0.1.6

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
2
  SHA256:
3
- metadata.gz: 943c909a6095c076c4979dc6a027e8218800c4e19da10b0b1e6502c6653ed9fd
4
- data.tar.gz: 04badb6692b592d1bdf47971d4aa0380fa0ce75f428538b87b123b50f4664afd
3
+ metadata.gz: 672bcd2f4168b0180a9654339c5775ab5396a00d1b0ac15e01de416136b146c9
4
+ data.tar.gz: d4e047811545276316641e46413c2f3484a00bd27bedc6c4ee19e2dfd5d3ce3a
5
5
  SHA512:
6
- metadata.gz: 8a6fcf2deff3e8216991f98ac0d9d9d71f7cb982715f5eda7380ed4ecce3e0ea2b598707eb252a1392de019800615cf8e3d42b1d21a049b5f375c3fec094e12d
7
- data.tar.gz: 351bd4fcc941732ec9ea9e4fd69e6b08122acf44e3c2c89b08ecc7c20a4edbac09a57b5cabe62aacfcd258f61b7426b327cac1a9a21f80e673060596d7274fc2
6
+ metadata.gz: 5f1184a526b297c848016fe5f44ecc7cbcefd91d427d6ddb27e1f438281ce1c5d66f2f1e6f3c571f7a776f603a25bdfa5422004dffc6391942ab0df4eff02a30
7
+ data.tar.gz: a6162d415c72dfbefa45fffec5e5bf5b4e7f29cb673d804408234b3c9e6b16f2bb57284f4aa8b5c78c73aadffcb2398911029be27edc257f2b38f09af162320d
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ **version 0.1.6**
2
+ <br>
3
+ <br>
4
+ Corrected a test rerun bug as well as a problem with key control regex patterns; made a slight modification to key controls: T is no longer case-sensitive and will now rerun the top failed test result from the current set. To view the top failed result from the current set without rerunning, press SPACEBAR.
data/README.md CHANGED
@@ -6,7 +6,7 @@ SpecSelector is an RSpec formatter that opens a utility menu in your terminal wi
6
6
 
7
7
  **View test results**
8
8
 
9
- Upon finishing the test run, the test result tree appears as a formatted list of top-level example groups. Select an example group to view its subgroups, select a subgroup to view its examples, and so on. You can view your test results with the selection tool, or just press T to immediately view the top failed test.
9
+ Upon finishing the test run, the test result tree appears as a formatted list of top-level example groups. Select an example group to view its subgroups, select a subgroup to view its examples, and so on. You can view your test results with the selection tool, or just press t to immediately view the top failed test.
10
10
 
11
11
  <br>
12
12
 
@@ -14,7 +14,7 @@ Upon finishing the test run, the test result tree appears as a formatted list of
14
14
 
15
15
  Using the selection tool, press M to add the selected group or example to the inclusion filter. Press R to rerun RSpec with only selected tests.
16
16
 
17
- Without using the selection tool, press F to rerun only failed tests. Press SHIFT + T to rerun only the top failed test.
17
+ Without using the selection tool, press F to rerun only failed tests. Press T to rerun only the top failed test.
18
18
 
19
19
  Press C to clear the inclusion filter. Press A to clear the inclusion filter and rerun RSpec with all tests.
20
20
 
@@ -44,13 +44,12 @@ The color of an example group description is determined by the result status of
44
44
 
45
45
  _key controls_
46
46
 
47
- Note: With the exception of T, letter key inputs are not case sensitive.
48
-
49
47
  Key control | Description
50
48
  ------------|--------------
51
49
  | BACKSPACE | View the list that contains the parent of the current list or example result summary.|
52
50
  | ENTER/RETURN | Select an example group or example from the result list.|
53
51
  | ESCAPE | Return to the top-level result list. If already viewing the top-level list, the escape key has no effect.|
52
+ | SPACEBAR | View the top failed example result summary from the current result set. |
54
53
  | UP/DOWN | Navigate up and down the result list, or, if viewing an example result summary, view the next or previous example result summary.|
55
54
  | A | Clear the inclusion filter and rerun RSpec with all examples.|
56
55
  | C | Clear the inclusion filter.|
@@ -60,7 +59,6 @@ Key control | Description
60
59
  | P | Hide or reveal passing examples in the current result set. |
61
60
  | R | Rerun RSpec with only examples and example groups marked for inclusion. |
62
61
  | T | Rerun RSpec with only the top failed example from the current result set. |
63
- | t | View the top failed example result summary from the current result set. |
64
62
  | V | View the inclusion filter as a list. |
65
63
  | Q | Exit spec_selector. |
66
64
 
@@ -127,6 +127,7 @@ module SpecSelectorUtil
127
127
  end
128
128
 
129
129
  def top_fail!
130
+ return if @failed.empty?
130
131
  @inclusion_filter = []
131
132
  filter_include(@failed.first)
132
133
  rerun
@@ -6,12 +6,12 @@ module SpecSelectorUtil
6
6
  DIRECTION_KEYS = ["\e[A", "\e[B"].freeze
7
7
  TREE_NAVIGATION_KEYS = ["\r", "\x7F", "\e"].freeze
8
8
  OPTION_KEYS = [
9
- /t/i, /f/i, /p/i, /q/i, /i/i, /r/i, /m/i, /c/i, /a/i, /v/i
9
+ /^t$/i, /^f$/i, /^p$/i, /^q$/i, /^i$/i, /^r$/i, /^m$/i, /^c$/i, /^a$/i, /^v$/i, /^ $/
10
10
  ].freeze
11
11
 
12
12
  def exit_only
13
13
  q_to_exit
14
- loop { quit if user_input.match?(/q/i) }
14
+ loop { quit if user_input.match?(/^q$/i) }
15
15
  end
16
16
 
17
17
  def selector
@@ -125,35 +125,35 @@ module SpecSelectorUtil
125
125
 
126
126
  def option_keys(input)
127
127
  case input
128
- when /T/
128
+ when /^t$/i
129
129
  top_fail!
130
- when /t/
130
+ when /^ $/
131
131
  top_fail
132
- when /p/i
132
+ when /^p$/i
133
133
  toggle_passing
134
- when /f/i
134
+ when /^f$/i
135
135
  run_only_fails
136
- when /q/i
136
+ when /^q$/i
137
137
  quit
138
- when /i/i
138
+ when /^i$/i
139
139
  unless @instructions
140
140
  view_instructions_page
141
141
  return
142
142
  end
143
143
 
144
144
  exit_instruction_page_only
145
- when /r/i
145
+ when /^r$/i
146
146
  rerun
147
147
  when /^a$/i
148
148
  rerun_all
149
- when /m/i
149
+ when /^m$/i
150
150
  return if @instructions
151
151
 
152
152
  @selected.metadata[:include] ? filter_remove : filter_include
153
153
  refresh_display
154
154
  when /^c$/i
155
155
  clear_filter
156
- when /v/i
156
+ when /^v$/i
157
157
  view_inclusion_filter
158
158
  end
159
159
  end
@@ -376,28 +376,28 @@ describe 'SpecSelectorUtil::UI' do
376
376
  allow_methods(:top_fail, :toggle_passing, :quit)
377
377
  end
378
378
 
379
- context 'when input string matches /t/i' do
379
+ context 'when input string matches /^ $/' do
380
380
  it 'calls #top_fail' do
381
- spec_selector.option_keys('t')
381
+ spec_selector.option_keys(' ')
382
382
  expect(spec_selector).to have_received(:top_fail)
383
383
  end
384
384
  end
385
385
 
386
- context 'when input string matches /p/i' do
386
+ context 'when input string matches /^p$/i' do
387
387
  it 'calls #toggle_passing' do
388
388
  spec_selector.option_keys('p')
389
389
  expect(spec_selector).to have_received(:toggle_passing)
390
390
  end
391
391
  end
392
392
 
393
- context 'when input string matches /q/i' do
393
+ context 'when input string matches /^q$/i' do
394
394
  it 'calls #quit' do
395
395
  spec_selector.option_keys('q')
396
396
  expect(spec_selector).to have_received(:quit)
397
397
  end
398
398
  end
399
399
 
400
- context 'when input string matches /i/i' do
400
+ context 'when input string matches /^i$/i' do
401
401
  context 'when instruction page is not open' do
402
402
  it 'calls #view_instructions_page' do
403
403
  allow(spec_selector).to receive(:view_instructions_page)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spec_selector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trevor Almon
@@ -34,7 +34,7 @@ cert_chain:
34
34
  2oaEU1xxH+4n3qzECM32PIry9QVrTud/3/ouDLy4LVVyutD5ZANsVQrr0y8vEA6+
35
35
  OXcnI0Yc8EI4dmIAwDI0ZfBo2OgFBxNJCeurVx36tUPsSWjJUd0BeA==
36
36
  -----END CERTIFICATE-----
37
- date: 2021-03-25 00:00:00.000000000 Z
37
+ date: 2021-03-30 00:00:00.000000000 Z
38
38
  dependencies:
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: rspec
@@ -65,6 +65,7 @@ executables: []
65
65
  extensions: []
66
66
  extra_rdoc_files: []
67
67
  files:
68
+ - CHANGELOG.md
68
69
  - README.md
69
70
  - lib/spec_selector.rb
70
71
  - lib/spec_selector/data_map.rb
@@ -94,6 +95,7 @@ licenses:
94
95
  metadata:
95
96
  source_code_uri: https://github.com/TrevorA-TrevorA/spec_selector
96
97
  homepage_uri: https://github.com/TrevorA-TrevorA/spec_selector
98
+ changelog_uri: https://github.com/TrevorA-TrevorA/spec_selector/blob/master/CHANGELOG.md
97
99
  post_install_message:
98
100
  rdoc_options: []
99
101
  require_paths:
metadata.gz.sig CHANGED
Binary file