rspec_pending_filter_formatter 0.1.0
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 +7 -0
- data/.rspec +2 -0
- data/CHANGELOG.md +15 -0
- data/LICENSE +21 -0
- data/README.md +104 -0
- data/Rakefile +8 -0
- data/lib/rspec_pending_filter_formatter/formatter.rb +14 -0
- data/lib/rspec_pending_filter_formatter/version.rb +5 -0
- data/lib/rspec_pending_filter_formatter.rb +8 -0
- metadata +94 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: '0991b6f09b018e66d408767dcd32c89c7c490dbf89711e51814f969dd7c7355b'
|
|
4
|
+
data.tar.gz: 9f2e13b7ec05fdc6f83aed01f35e83bb3d0d19756f9b59de3fc3df49e212ab20
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: a618de086936943bf18c3baf94ee4f115f93ec4577897f97a2bde53dbb666c68215e62cd3d44dabe7c7fb9d440814f47e22d10e673431016714a5e4e29f2a484
|
|
7
|
+
data.tar.gz: c3f2c3d5f9bcc4c232fc1375c37620da20b9d8944c77d34b53cc0d5478db7a22a83dc5dc864d3783d89a7dfeccf09530dca8fff6701fa403527504812f381209
|
data/.rspec
ADDED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2025-11-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release
|
|
12
|
+
- Custom RSpec formatter that filters pending test details
|
|
13
|
+
- Shows only count of pending tests in summary
|
|
14
|
+
- Displays "*" character during test execution for pending tests
|
|
15
|
+
- Based on `ProgressFormatter` for familiar output style
|
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 willnet
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# RSpec Pending Filter Formatter
|
|
2
|
+
|
|
3
|
+
A custom RSpec formatter that suppresses detailed pending test output and shows only the count in the summary.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your application's Gemfile:
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
gem 'rspec_pending_filter_formatter'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
And then execute:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bundle install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or install it yourself as:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
gem install rspec_pending_filter_formatter
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
You can use this formatter by specifying it on the command line:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
rspec --format RSpecPendingFilterFormatter::Formatter
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or configure it in your `.rspec` file:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
--format RSpecPendingFilterFormatter::Formatter
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or in your `spec/spec_helper.rb`:
|
|
40
|
+
|
|
41
|
+
```ruby
|
|
42
|
+
RSpec.configure do |config|
|
|
43
|
+
config.formatter = RSpecPendingFilterFormatter::Formatter
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## What it does
|
|
48
|
+
|
|
49
|
+
This formatter extends the standard `ProgressFormatter` and modifies the behavior for pending tests:
|
|
50
|
+
|
|
51
|
+
- **During test execution**: Pending tests show the "*" character as usual
|
|
52
|
+
- **No detailed output**: File paths, line numbers, and reasons for pending tests are not displayed
|
|
53
|
+
- **Summary**: The count of pending tests is shown only in the final RSpec summary line
|
|
54
|
+
|
|
55
|
+
### Standard RSpec output (with pending details)
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
..*..F
|
|
59
|
+
|
|
60
|
+
Pending: (Failures listed here)
|
|
61
|
+
1) User registration validates email format
|
|
62
|
+
# Not yet implemented
|
|
63
|
+
# ./spec/user_spec.rb:15
|
|
64
|
+
|
|
65
|
+
Failures:
|
|
66
|
+
...
|
|
67
|
+
|
|
68
|
+
Finished in 0.5 seconds
|
|
69
|
+
5 examples, 1 failure, 1 pending
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### With this formatter
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
..*..F
|
|
76
|
+
|
|
77
|
+
Failures:
|
|
78
|
+
...
|
|
79
|
+
|
|
80
|
+
Finished in 0.5 seconds
|
|
81
|
+
5 examples, 1 failure, 1 pending
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Why use this?
|
|
85
|
+
|
|
86
|
+
This formatter is useful when:
|
|
87
|
+
|
|
88
|
+
- You have many pending tests that clutter the output
|
|
89
|
+
- You want to focus on failures and successes during test execution
|
|
90
|
+
- You only need to know the count of pending tests in the summary, not the detailed reasons
|
|
91
|
+
|
|
92
|
+
## Development
|
|
93
|
+
|
|
94
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
|
|
95
|
+
|
|
96
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
97
|
+
|
|
98
|
+
## Contributing
|
|
99
|
+
|
|
100
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/willnet/rspec-pending-filter-formatter.
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "rspec/core/formatters/progress_formatter"
|
|
4
|
+
|
|
5
|
+
module RSpecPendingFilterFormatter
|
|
6
|
+
class Formatter < RSpec::Core::Formatters::ProgressFormatter
|
|
7
|
+
RSpec::Core::Formatters.register self, :dump_pending
|
|
8
|
+
|
|
9
|
+
# Override to suppress pending examples output
|
|
10
|
+
def dump_pending(_notification)
|
|
11
|
+
# Do nothing - the pending count will be displayed elsewhere
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: rspec_pending_filter_formatter
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- willnet
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: rspec-core
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 3.12.0
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 3.12.0
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: rake
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '13.0'
|
|
33
|
+
type: :development
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '13.0'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: rspec
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '3.12'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '3.12'
|
|
54
|
+
description: A custom RSpec formatter that suppresses detailed pending test output
|
|
55
|
+
and shows only the count in the summary
|
|
56
|
+
email:
|
|
57
|
+
- netwillnet@gmail.com
|
|
58
|
+
executables: []
|
|
59
|
+
extensions: []
|
|
60
|
+
extra_rdoc_files: []
|
|
61
|
+
files:
|
|
62
|
+
- ".rspec"
|
|
63
|
+
- CHANGELOG.md
|
|
64
|
+
- LICENSE
|
|
65
|
+
- README.md
|
|
66
|
+
- Rakefile
|
|
67
|
+
- lib/rspec_pending_filter_formatter.rb
|
|
68
|
+
- lib/rspec_pending_filter_formatter/formatter.rb
|
|
69
|
+
- lib/rspec_pending_filter_formatter/version.rb
|
|
70
|
+
homepage: https://github.com/willnet/rspec_pending_filter_formatter
|
|
71
|
+
licenses:
|
|
72
|
+
- MIT
|
|
73
|
+
metadata:
|
|
74
|
+
homepage_uri: https://github.com/willnet/rspec_pending_filter_formatter
|
|
75
|
+
source_code_uri: https://github.com/willnet/rspec_pending_filter_formatter
|
|
76
|
+
changelog_uri: https://github.com/willnet/rspec_pending_filter_formatter/blob/main/CHANGELOG.md
|
|
77
|
+
rdoc_options: []
|
|
78
|
+
require_paths:
|
|
79
|
+
- lib
|
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
|
+
requirements:
|
|
82
|
+
- - ">="
|
|
83
|
+
- !ruby/object:Gem::Version
|
|
84
|
+
version: 2.7.0
|
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
requirements: []
|
|
91
|
+
rubygems_version: 3.6.9
|
|
92
|
+
specification_version: 4
|
|
93
|
+
summary: RSpec formatter that filters out detailed pending test information
|
|
94
|
+
test_files: []
|