rspec-risky 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.
@@ -0,0 +1,81 @@
1
+ module RSpec
2
+ module Risky
3
+ VERSION: String
4
+
5
+ def self.configuration: () -> Configuration
6
+ def self.configure: (?untyped rspec_configuration) { (Configuration) -> void } -> Configuration
7
+ def self.record_expectation: (?Integer count) -> void
8
+
9
+ class Error < StandardError
10
+ end
11
+
12
+ class RiskyExampleError < Error
13
+ attr_reader verdicts: Array[RuleResult]
14
+ end
15
+
16
+ class Configuration
17
+ attr_reader unknown_test: UnknownTestConfig
18
+ attr_reader redundant_print: RedundantPrintConfig
19
+
20
+ def rules: () -> Array[Symbol]
21
+ def rules=: (Array[Symbol]) -> Array[Symbol]
22
+ def rule_enabled?: (Symbol) -> bool
23
+ end
24
+
25
+ class RuleConfig
26
+ attr_reader severity: Symbol
27
+
28
+ def severity=: (Symbol) -> Symbol
29
+ end
30
+
31
+ class UnknownTestConfig < RuleConfig
32
+ attr_accessor adapters: Array[untyped]
33
+ attr_accessor count_mocks: bool
34
+
35
+ def adapter_count: (untyped example) -> Integer
36
+ end
37
+
38
+ class RedundantPrintConfig < RuleConfig
39
+ attr_accessor allow_warn: bool
40
+ attr_accessor capture_loggers: bool
41
+ attr_accessor logger_ignore_paths: Array[String]
42
+ attr_accessor passthrough: bool
43
+ attr_accessor strict: bool
44
+ attr_reader capture: Symbol
45
+
46
+ def capture=: (Symbol) -> Symbol
47
+ def captures_logger?: (String?) -> bool
48
+ def captures?: (Symbol) -> bool
49
+ end
50
+
51
+ class RuleResult
52
+ attr_reader rule: Symbol
53
+ attr_reader severity: Symbol
54
+ attr_reader message: String
55
+ attr_reader evidence: untyped
56
+
57
+ def to_h: () -> Hash[Symbol, untyped]
58
+ end
59
+
60
+ class Formatter
61
+ end
62
+
63
+ class JsonFormatter
64
+ end
65
+
66
+ class JsonEventFormatter
67
+ end
68
+
69
+ class StaticDetector
70
+ def self.scan: (Array[String] paths) -> Array[untyped]
71
+ end
72
+
73
+ module Evaluation
74
+ def self.assertion_density: (Hash[String, untyped] dynamic_payload) -> Hash[Symbol, untyped]
75
+ def self.compare: (static_findings: Array[untyped], dynamic_payload: Hash[String, untyped]) -> Hash[Symbol, untyped]
76
+ def self.label_template: (Hash[String, untyped] dynamic_payload) -> Array[Hash[Symbol, untyped]]
77
+ def self.mutation_study: (Hash[String, untyped] dynamic_payload, ?Hash[String, untyped]? mutation_payload) -> Hash[Symbol, untyped]
78
+ def self.precision: (Hash[String, untyped] labels_payload) -> Hash[Symbol, untyped]
79
+ end
80
+ end
81
+ end
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec-risky
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Yudai Takada
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.13'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '3.13'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rspec-expectations
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '3.13'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.13'
40
+ - !ruby/object:Gem::Dependency
41
+ name: rspec-mocks
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '3.13'
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.13'
54
+ - !ruby/object:Gem::Dependency
55
+ name: minitest
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '5.0'
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '5.0'
68
+ description: Detects RSpec examples that execute no expectations or write unexpected
69
+ stdout/stderr output.
70
+ email:
71
+ - t.yudai92@gmail.com
72
+ executables:
73
+ - rspec-risky
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - LICENSE.txt
78
+ - README.md
79
+ - exe/rspec-risky
80
+ - lib/minitest/risky_plugin.rb
81
+ - lib/rspec/risky.rb
82
+ - lib/rspec/risky/autorun.rb
83
+ - lib/rspec/risky/configuration.rb
84
+ - lib/rspec/risky/evaluation.rb
85
+ - lib/rspec/risky/formatter.rb
86
+ - lib/rspec/risky/json_event_formatter.rb
87
+ - lib/rspec/risky/json_formatter.rb
88
+ - lib/rspec/risky/minitest/output_capture.rb
89
+ - lib/rspec/risky/minitest/plugin.rb
90
+ - lib/rspec/risky/minitest/reporter.rb
91
+ - lib/rspec/risky/probe/expectation_probe.rb
92
+ - lib/rspec/risky/probe/fd_capture.rb
93
+ - lib/rspec/risky/probe/output_probe.rb
94
+ - lib/rspec/risky/probe/output_report.rb
95
+ - lib/rspec/risky/probe/recording_io.rb
96
+ - lib/rspec/risky/rake_tasks.rb
97
+ - lib/rspec/risky/rspec_cli.rb
98
+ - lib/rspec/risky/static_detector.rb
99
+ - lib/rspec/risky/verdict.rb
100
+ - lib/rspec/risky/version.rb
101
+ - sig/rspec/risky.rbs
102
+ homepage: https://github.com/ydah/rspec-risky
103
+ licenses:
104
+ - MIT
105
+ metadata:
106
+ homepage_uri: https://github.com/ydah/rspec-risky
107
+ source_code_uri: https://github.com/ydah/rspec-risky/tree/main
108
+ rdoc_options: []
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: 3.2.0
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ requirements: []
122
+ rubygems_version: 4.0.6
123
+ specification_version: 4
124
+ summary: Runtime risky-test detection for RSpec.
125
+ test_files: []