branchproof 0.9.0 → 0.10.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 +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +77 -18
- data/doc/Branchproof/Evidence.md +3 -0
- data/doc/Branchproof/Project.md +4 -1
- data/doc/Branchproof/RSpecAdapter/ClassRunnerGuard.md +11 -0
- data/doc/Branchproof/RSpecAdapter/ContextLifecycle.md +14 -0
- data/doc/Branchproof/RSpecAdapter/DefaultDiscovery.md +11 -0
- data/doc/Branchproof/RSpecAdapter/ExampleLifecycle.md +11 -0
- data/doc/Branchproof/RSpecAdapter/RunnerGuard.md +11 -0
- data/doc/Branchproof/RSpecAdapter/UnsupportedRunner.md +12 -0
- data/doc/Branchproof/RSpecAdapter.md +47 -0
- data/doc/Branchproof/RailsSupport.md +35 -2
- data/doc/Branchproof/Report.md +3 -0
- data/doc/Branchproof/Runtime.md +3 -0
- data/doc/Branchproof/Worker.md +8 -1
- data/doc/Branchproof.md +8 -1
- data/doc/CHANGELOG.md +19 -0
- data/doc/README.md +77 -18
- data/lib/branchproof/cli.rb +74 -28
- data/lib/branchproof/comparison.rb +52 -6
- data/lib/branchproof/evidence.rb +4 -0
- data/lib/branchproof/focused_report.rb +5 -0
- data/lib/branchproof/project.rb +49 -2
- data/lib/branchproof/rails_support.rb +101 -0
- data/lib/branchproof/report.rb +21 -1
- data/lib/branchproof/rspec_adapter.rb +423 -0
- data/lib/branchproof/runtime.rb +4 -0
- data/lib/branchproof/saved_report.rb +9 -2
- data/lib/branchproof/version.rb +1 -1
- data/lib/branchproof/worker.rb +75 -15
- data/lib/branchproof.rb +1 -0
- data/llms.txt +8 -1
- data/sig/branchproof.rbs +28 -1
- metadata +10 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ac29ee2c9df680fb49df3bc144ed102168320ad48908bcf9ec665521ebcfec0b
|
|
4
|
+
data.tar.gz: c31a3385bdbf3e42c538d4bd85c0120ee414da71bb184653287ab644ff7d243e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9edc32c189cdbf5fbab52e224f9a2292e3cc1ec3ac20090408f0371b2dcd76198a6295059bd65be868eb041f12f62cae54b0a4a0a61e1cc7302cd6d90cfe3475
|
|
7
|
+
data.tar.gz: 2c60434afbc2940cfcb17717c37787a3560e18d8278b46fbe7e1571bd4556e7230de7648bdff883e85666be066396c3ffbdc154937913bae54dbf365cadfde7e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.10.0] - 2026-09-21
|
|
4
|
+
|
|
5
|
+
- Add the first-release RSpec execution path for plain Ruby and Rails projects.
|
|
6
|
+
It supports RSpec 3.13, including Rails 8.1 with rspec-rails 8.x on CRuby 3.4.
|
|
7
|
+
Integration is verified against rspec-rails 8.0.4 and native RSpec behavior.
|
|
8
|
+
- Add `--framework auto|minitest|rspec`, native RSpec discovery that respects
|
|
9
|
+
exclusions and custom patterns, full-description labels, and status mapping for pending,
|
|
10
|
+
skipped, fixed pending, and failed examples.
|
|
11
|
+
- Keep Rails helper ownership with the application after Branchproof's loader;
|
|
12
|
+
transaction behavior, in-process specs, and context/suite/unattributed
|
|
13
|
+
evidence are recorded explicitly.
|
|
14
|
+
- Allow focused pure-Ruby specs inside Rails projects without requiring Rails boot.
|
|
15
|
+
- Match RSpec examples across saved reports only when spec and declaration
|
|
16
|
+
revisions agree, preventing false matches after examples are inserted or reordered.
|
|
17
|
+
- Stream test progress to stderr, show quoted RSpec rerun commands, and explain
|
|
18
|
+
unmatched test globs, empty suites, and filters selecting no examples.
|
|
19
|
+
- Document repeated ordinary and shared-example benchmarks with allocations
|
|
20
|
+
and peak process memory; end-to-end overhead remains substantial.
|
|
21
|
+
|
|
3
22
|
## [0.9.0] - 2026-09-18
|
|
4
23
|
|
|
5
24
|
- Measure contextual predicates, guarded pattern selection, dynamic case splat
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Branchproof
|
|
2
2
|
|
|
3
3
|
Branchproof measures decision, condition, modified condition/decision (MC/DC),
|
|
4
|
-
and decision-table coverage from one serial Minitest run. It discovers Ruby
|
|
4
|
+
and decision-table coverage from one serial Minitest or RSpec run. It discovers Ruby
|
|
5
5
|
decisions through Prism, records their runtime paths, and attributes evidence
|
|
6
6
|
to tests. Boolean decisions receive the coverage ladder; `case`, pattern
|
|
7
7
|
alternatives, safe navigation, and conditional assignments receive alternative
|
|
@@ -22,10 +22,13 @@ Or add it to a bundle:
|
|
|
22
22
|
bundle add branchproof
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Branchproof targets CRuby 3.3 and 3.4, Minitest 5.x, and Prism 1.x. The
|
|
26
|
-
published core runtime matrix is the CI matrix. Rails
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
Branchproof targets CRuby 3.3 and 3.4, Minitest 5.x, RSpec 3.13, and Prism 1.x. The
|
|
26
|
+
published core runtime matrix is the CI matrix. Rails/RSpec execution is limited
|
|
27
|
+
to Rails 8.1.x, rspec-rails 8.x, RSpec 3.13.x, and CRuby 3.4.x; passing core
|
|
28
|
+
tests on Ruby 4.0 does not imply Rails/RSpec support. Integration has been checked
|
|
29
|
+
with Rails 8.1.3.1, rspec-rails 8.0.4, RSpec Core 3.13.6, and CRuby 3.4.7.
|
|
30
|
+
Rails and RSpec are optional dependencies supplied by the application.
|
|
31
|
+
Minitest 5.x remains a runtime dependency of this gem.
|
|
29
32
|
Unsupported syntax and incomplete observations remain visible in the report
|
|
30
33
|
instead of being counted as coverage.
|
|
31
34
|
|
|
@@ -33,7 +36,7 @@ instead of being counted as coverage.
|
|
|
33
36
|
|
|
34
37
|
Run `branchproof analyze` with the source files or globs to inspect, followed by
|
|
35
38
|
options. A second `--` separates Branchproof options from arguments passed to
|
|
36
|
-
|
|
39
|
+
the selected test framework:
|
|
37
40
|
|
|
38
41
|
```sh
|
|
39
42
|
branchproof analyze 'lib/**/*.rb' --test 'test/**/*_test.rb' \
|
|
@@ -58,22 +61,60 @@ the application's bundle and Rails version remain in effect:
|
|
|
58
61
|
bundle exec branchproof analyze 'app/**/*.rb' --project rails --test 'test/**/*_test.rb'
|
|
59
62
|
```
|
|
60
63
|
|
|
64
|
+
Choose the test framework independently from project kind:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
bundle exec branchproof analyze 'app/**/*.rb' --project rails --framework rspec
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`--framework auto|minitest|rspec` is explicit about the adapter. Auto mode
|
|
71
|
+
selects RSpec when `.rspec` or `spec/**/*_spec.rb` markers exist and Minitest
|
|
72
|
+
when `test/**/*_test.rb` or `test/**/test_*.rb` markers exist. If both are
|
|
73
|
+
present, specify the framework. RSpec discovery uses `spec/**/*_spec.rb`; an
|
|
74
|
+
explicit `--test` selection remains authoritative. Project roots are resolved
|
|
75
|
+
explicitly, and report paths are relative to that root so reports from
|
|
76
|
+
different checkouts can be compared.
|
|
77
|
+
|
|
78
|
+
Install `rspec` in the application's test bundle; Rails applications also need
|
|
79
|
+
`rspec-rails`. RSpec reads its usual option files and `SPEC_OPTS`, including
|
|
80
|
+
helper requires, filters, ordering, and file or example-ID selectors. Selectors
|
|
81
|
+
from RSpec configuration replace default discovery. Combining those selectors
|
|
82
|
+
with an explicit Branchproof `--test` is rejected as ambiguous; ordinary filters
|
|
83
|
+
such as `--tag` and `--example` can accompany `--test`.
|
|
84
|
+
|
|
85
|
+
RSpec before hooks, eager `let!`, and around-hook prefixes own setup evidence.
|
|
86
|
+
The example body and helpers evaluated there own body evidence; after hooks,
|
|
87
|
+
mock cleanup, and around-hook suffixes own teardown evidence. Suite and context
|
|
88
|
+
hooks remain unattributed. Pending and skipped examples do not invent execution;
|
|
89
|
+
an unexpectedly passing pending example remains a failure.
|
|
90
|
+
|
|
91
|
+
RSpec support is serial: dry-run, bisect, DRb, custom runners, nested runs, and
|
|
92
|
+
repeated example attempts are rejected. Rails/RSpec supports Rails 8.1.x with
|
|
93
|
+
rspec-rails 8.x on CRuby 3.4.x. Feature and system specs use the in-process
|
|
94
|
+
Capybara `rack_test` driver; browser drivers require execution-context support
|
|
95
|
+
outside this release. Capybara is optional for apps that do not use those specs.
|
|
96
|
+
|
|
61
97
|
For a project rooted at the current directory, `--project auto` is the
|
|
62
98
|
default. It selects Rails only when both `config/application.rb` and
|
|
63
99
|
`config/environment.rb` exist; otherwise it selects a plain Ruby project.
|
|
64
100
|
Use `--project ruby` or `--project rails` to override detection. An explicit
|
|
65
101
|
Rails project without both boot files is a usage error.
|
|
66
102
|
|
|
67
|
-
|
|
103
|
+
Minitest defaults discover the sorted, de-duplicated union of
|
|
68
104
|
`test/**/*_test.rb` and `test/**/test_*.rb`. Helper, support, and fixture files
|
|
69
105
|
are excluded from that default set. `--test` remains authoritative when test
|
|
70
106
|
files are selected explicitly. The worker prepends the project's `lib` and
|
|
71
|
-
`test` directories to its child load path, so application `require` calls
|
|
107
|
+
`test` directories (`lib` and `spec` for RSpec) to its child load path, so application `require` calls
|
|
72
108
|
resolve without changing the parent process.
|
|
73
109
|
|
|
74
|
-
Rails analysis boots
|
|
75
|
-
|
|
76
|
-
|
|
110
|
+
Rails analysis boots the application inside the isolated worker after
|
|
111
|
+
Branchproof's loader and the selected framework hooks are installed. The
|
|
112
|
+
application's `rails_helper` owns requiring and configuring `rspec/rails` after
|
|
113
|
+
the loader; the helper must not require `branchproof` again. Selected specs
|
|
114
|
+
may require only `spec_helper` and run without booting Rails,
|
|
115
|
+
even when project detection selects Rails. Once Rails is loaded, Branchproof
|
|
116
|
+
requires an initialized application and enforces the Rails/RSpec support limits.
|
|
117
|
+
The child receives `RAILS_ENV=test`, `RACK_ENV=test`, `PARALLEL_WORKERS=1`,
|
|
77
118
|
`DISABLE_BOOTSNAP=1`, and `DISABLE_SPRING=1`; the invoking process environment
|
|
78
119
|
is unchanged. The Rails metadata in the report identifies the selected
|
|
79
120
|
project and Rails version.
|
|
@@ -93,6 +134,17 @@ the witness pair or missing counterpart constraints beside each condition;
|
|
|
93
134
|
Level 2 and Level 3 also list named supporting tests. Repeated supporting-set
|
|
94
135
|
rows are collapsed in terminal output only.
|
|
95
136
|
|
|
137
|
+
RSpec owners use the example's `full_description` and positional `example_id`.
|
|
138
|
+
Terminal views include quoted rerun commands, including selectors for shared
|
|
139
|
+
examples. These selectors apply to the recorded spec revision. Comparisons
|
|
140
|
+
require matching spec and declaration digests before matching example owners;
|
|
141
|
+
changed specs and older reports without digests are treated conservatively.
|
|
142
|
+
Runner output streams to stderr while JSON reports remain on stdout.
|
|
143
|
+
Pending, skipped, fixed-pending, and failed examples map to the corresponding
|
|
144
|
+
baseline statuses; suite and context lifecycle events remain visible, and
|
|
145
|
+
observations without a test owner are counted as unattributed. The same levels
|
|
146
|
+
and terminal views are available for both adapters.
|
|
147
|
+
|
|
96
148
|
For example, running the contents of the small `decision.rb` /
|
|
97
149
|
`test_decision_test.rb` fixture from a project `lib/` and `test/` directory
|
|
98
150
|
with the terminal format produces a summary like this:
|
|
@@ -654,12 +706,14 @@ the serial Minitest runner. This is useful for seeds and name filters:
|
|
|
654
706
|
branchproof analyze 'lib/**/*.rb' --level 1 -- --seed 9001 -n /checkout/
|
|
655
707
|
```
|
|
656
708
|
|
|
657
|
-
The
|
|
658
|
-
Rails applications. Rails lazy and eager loading are supported
|
|
659
|
-
application does not enable reloading for the test run.
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
709
|
+
The first release supports serial Minitest and RSpec execution in plain Ruby
|
|
710
|
+
projects and Rails applications. Rails lazy and eager loading are supported
|
|
711
|
+
when the application does not enable reloading for the test run. Transactions
|
|
712
|
+
and in-process specs are supported within the serial process policy. Parallel
|
|
713
|
+
or forked runners, remote or threaded browser drivers, mutation execution,
|
|
714
|
+
Rails system/browser tests, custom Rails test commands, generated tests, and
|
|
715
|
+
reloading configurations are explicitly unsupported and produce diagnostics
|
|
716
|
+
rather than a passing analysis.
|
|
663
717
|
|
|
664
718
|
## Library entry points
|
|
665
719
|
|
|
@@ -672,7 +726,8 @@ Branchproof::Records.id(name: "stable identity")
|
|
|
672
726
|
|
|
673
727
|
`require "mcdc"` and `MCDC` are compatibility aliases for the same public
|
|
674
728
|
namespace. The CLI is the supported way to run a complete analysis;
|
|
675
|
-
`Branchproof::Project` exposes project selection and
|
|
729
|
+
`Branchproof::Project` exposes project and framework selection and
|
|
730
|
+
child-environment policy,
|
|
676
731
|
and `Branchproof::RailsSupport` is the optional Rails boot boundary. The library
|
|
677
732
|
classes expose the source, runtime, evidence, analysis, and report contracts
|
|
678
733
|
for adapters and integrations.
|
|
@@ -705,6 +760,10 @@ Run the commands with the Ruby executable you intend to validate. The checked
|
|
|
705
760
|
release environments are CRuby 3.3.6 and 3.4.5. Each runtime
|
|
706
761
|
must provide the declared Minitest 5.x and Prism 1.x dependencies.
|
|
707
762
|
|
|
763
|
+
The repeatable native-versus-instrumented adapter benchmark and its captured
|
|
764
|
+
Ruby 3.4.7 result are in
|
|
765
|
+
[`docs/benchmarks/rspec-adapter.md`](docs/benchmarks/rspec-adapter.md).
|
|
766
|
+
|
|
708
767
|
## License
|
|
709
768
|
|
|
710
769
|
Branchproof is available under the [Apache License, Version 2.0](LICENSE.txt).
|
data/doc/Branchproof/Evidence.md
CHANGED
data/doc/Branchproof/Project.md
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
Resolves the project policy used by the isolated analysis worker.
|
|
9
9
|
|
|
10
10
|
## Constants
|
|
11
|
+
### `FRAMEWORKS` <a id="constant-FRAMEWORKS"></a> <a id="FRAMEWORKS-constant"></a>
|
|
12
|
+
Not documented.
|
|
13
|
+
|
|
11
14
|
### `MODES` <a id="constant-MODES"></a> <a id="MODES-constant"></a>
|
|
12
15
|
Not documented.
|
|
13
16
|
|
|
@@ -15,7 +18,7 @@ Not documented.
|
|
|
15
18
|
Not documented.
|
|
16
19
|
|
|
17
20
|
## Public Instance Methods
|
|
18
|
-
### `initialize(root:, mode: = "auto")` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
21
|
+
### `initialize(root:, mode: = "auto", framework: = "auto")` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
19
22
|
- **@raise** [ArgumentError]
|
|
20
23
|
- **@return** [Project] a new instance of Project
|
|
21
24
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Module Branchproof::RSpecAdapter::ClassRunnerGuard <a id="module-Branchproof-RSpecAdapter-ClassRunnerGuard"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/branchproof/rspec_adapter.rb |
|
|
6
|
+
|
|
7
|
+
Rejects additional class-level runner entry points.
|
|
8
|
+
|
|
9
|
+
## Public Instance Methods
|
|
10
|
+
### `run(*args)` <a id="method-i-run"></a> <a id="run-instance_method"></a>
|
|
11
|
+
Not documented.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Module Branchproof::RSpecAdapter::ContextLifecycle <a id="module-Branchproof-RSpecAdapter-ContextLifecycle"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/branchproof/rspec_adapter.rb |
|
|
6
|
+
|
|
7
|
+
Keeps group-level hooks outside individual example ownership.
|
|
8
|
+
|
|
9
|
+
## Public Instance Methods
|
|
10
|
+
### `run_after_context_hooks(*args)` <a id="method-i-run_after_context_hooks"></a> <a id="run_after_context_hooks-instance_method"></a>
|
|
11
|
+
Not documented.
|
|
12
|
+
|
|
13
|
+
### `run_before_context_hooks(*args)` <a id="method-i-run_before_context_hooks"></a> <a id="run_before_context_hooks-instance_method"></a>
|
|
14
|
+
Not documented.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Module Branchproof::RSpecAdapter::DefaultDiscovery <a id="module-Branchproof-RSpecAdapter-DefaultDiscovery"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/branchproof/rspec_adapter.rb |
|
|
6
|
+
|
|
7
|
+
Restores CLI directory discovery when RSpec runs inside the worker.
|
|
8
|
+
|
|
9
|
+
## Public Instance Methods
|
|
10
|
+
### `configure(configuration)` <a id="method-i-configure"></a> <a id="configure-instance_method"></a>
|
|
11
|
+
Not documented.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Module Branchproof::RSpecAdapter::ExampleLifecycle <a id="module-Branchproof-RSpecAdapter-ExampleLifecycle"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/branchproof/rspec_adapter.rb |
|
|
6
|
+
|
|
7
|
+
Assigns observation phases while the reporter owns test registration.
|
|
8
|
+
|
|
9
|
+
## Public Instance Methods
|
|
10
|
+
### `run(*args)` <a id="method-i-run"></a> <a id="run-instance_method"></a>
|
|
11
|
+
Not documented.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Module Branchproof::RSpecAdapter::RunnerGuard <a id="module-Branchproof-RSpecAdapter-RunnerGuard"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/branchproof/rspec_adapter.rb |
|
|
6
|
+
|
|
7
|
+
Allows only the worker-owned native runner instance.
|
|
8
|
+
|
|
9
|
+
## Public Instance Methods
|
|
10
|
+
### `run(*args)` <a id="method-i-run"></a> <a id="run-instance_method"></a>
|
|
11
|
+
Not documented.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Class Branchproof::RSpecAdapter::UnsupportedRunner <a id="class-Branchproof-RSpecAdapter-UnsupportedRunner"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | ArgumentError |
|
|
6
|
+
| **Defined in** | lib/branchproof/rspec_adapter.rb |
|
|
7
|
+
|
|
8
|
+
Identifies runner capabilities that cannot produce supported evidence.
|
|
9
|
+
|
|
10
|
+
## Public Instance Methods
|
|
11
|
+
### `diagnostic_code()` <a id="method-i-diagnostic_code"></a> <a id="diagnostic_code-instance_method"></a>
|
|
12
|
+
Not documented.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Class Branchproof::RSpecAdapter <a id="class-Branchproof-RSpecAdapter"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | Object |
|
|
6
|
+
| **Defined in** | lib/branchproof/rspec_adapter.rb |
|
|
7
|
+
|
|
8
|
+
Bridges one serial RSpec run to Runtime lifecycle ownership.
|
|
9
|
+
|
|
10
|
+
## Constants
|
|
11
|
+
### `FORBIDDEN_OPTIONS` <a id="constant-FORBIDDEN_OPTIONS"></a> <a id="FORBIDDEN_OPTIONS-constant"></a>
|
|
12
|
+
Not documented.
|
|
13
|
+
|
|
14
|
+
## Attributes
|
|
15
|
+
### `active_adapter` [RW] <a id="attribute-c-active_adapter"></a> <a id="active_adapter-class_method"></a>
|
|
16
|
+
Returns the value of attribute active_adapter.
|
|
17
|
+
|
|
18
|
+
### `runner_adapter` [RW] <a id="attribute-c-runner_adapter"></a> <a id="runner_adapter-class_method"></a>
|
|
19
|
+
Returns the value of attribute runner_adapter.
|
|
20
|
+
|
|
21
|
+
### `late_execution_error` [R] <a id="attribute-i-late_execution_error"></a> <a id="late_execution_error-instance_method"></a>
|
|
22
|
+
Returns the value of attribute late_execution_error.
|
|
23
|
+
|
|
24
|
+
### `tests` [R] <a id="attribute-i-tests"></a> <a id="tests-instance_method"></a>
|
|
25
|
+
Returns the value of attribute tests.
|
|
26
|
+
|
|
27
|
+
## Public Instance Methods
|
|
28
|
+
### `enter_runner!(runner)` <a id="method-i-enter_runner-21"></a> <a id="enter_runner!-instance_method"></a>
|
|
29
|
+
Not documented.
|
|
30
|
+
|
|
31
|
+
### `example_finished(notification)` <a id="method-i-example_finished"></a> <a id="example_finished-instance_method"></a>
|
|
32
|
+
Not documented.
|
|
33
|
+
|
|
34
|
+
### `example_started(notification)` <a id="method-i-example_started"></a> <a id="example_started-instance_method"></a>
|
|
35
|
+
Not documented.
|
|
36
|
+
|
|
37
|
+
### `initialize(runtime:)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
38
|
+
- **@return** [RSpecAdapter] a new instance of RSpecAdapter
|
|
39
|
+
|
|
40
|
+
### `reject_execution!(message)` <a id="method-i-reject_execution-21"></a> <a id="reject_execution!-instance_method"></a>
|
|
41
|
+
- **@raise** [@run_error]
|
|
42
|
+
|
|
43
|
+
### `run(test_files:, runner_args:, on_complete:, before_load: = nil, after_load: = nil, test_selection_explicit: = false)` <a id="method-i-run"></a> <a id="run-instance_method"></a>
|
|
44
|
+
rubocop:disable-next Metrics/ParameterLists
|
|
45
|
+
|
|
46
|
+
### `validate_runner!()` <a id="method-i-validate_runner-21"></a> <a id="validate_runner!-instance_method"></a>
|
|
47
|
+
Not documented.
|
|
@@ -6,16 +6,31 @@
|
|
|
6
6
|
|
|
7
7
|
Boots the selected Rails application after Branchproof's load hook is active.
|
|
8
8
|
|
|
9
|
+
## Constants
|
|
10
|
+
### `SUPPORTED_CAPYBARA_DRIVER` <a id="constant-SUPPORTED_CAPYBARA_DRIVER"></a> <a id="SUPPORTED_CAPYBARA_DRIVER-constant"></a>
|
|
11
|
+
Not documented.
|
|
12
|
+
|
|
13
|
+
### `SUPPORTED_RAILS` <a id="constant-SUPPORTED_RAILS"></a> <a id="SUPPORTED_RAILS-constant"></a>
|
|
14
|
+
Not documented.
|
|
15
|
+
|
|
16
|
+
### `SUPPORTED_RSPEC_RAILS_MAJOR` <a id="constant-SUPPORTED_RSPEC_RAILS_MAJOR"></a> <a id="SUPPORTED_RSPEC_RAILS_MAJOR-constant"></a>
|
|
17
|
+
Not documented.
|
|
18
|
+
|
|
9
19
|
## Public Class Methods
|
|
10
20
|
### `boot(project:)` <a id="method-c-boot"></a> <a id="boot-class_method"></a>
|
|
11
|
-
|
|
21
|
+
Boot the Rails application for the native Minitest adapter.
|
|
12
22
|
|
|
13
23
|
### `boot_environment(environment)` <a id="method-c-boot_environment"></a> <a id="boot_environment-class_method"></a>
|
|
14
|
-
|
|
24
|
+
Require the application and validate the process-wide Rails policy. This
|
|
25
|
+
method is public so adapter-specific helpers can own the remaining test
|
|
26
|
+
framework setup while sharing the exact same Rails boot checks.
|
|
15
27
|
|
|
16
28
|
### `environment_path(project)` <a id="method-c-environment_path"></a> <a id="environment_path-class_method"></a>
|
|
17
29
|
Not documented.
|
|
18
30
|
|
|
31
|
+
### `install_rspec_driver_guard!()` <a id="method-c-install_rspec_driver_guard-21"></a> <a id="install_rspec_driver_guard!-class_method"></a>
|
|
32
|
+
Not documented.
|
|
33
|
+
|
|
19
34
|
### `metadata()` <a id="method-c-metadata"></a> <a id="metadata-class_method"></a>
|
|
20
35
|
Not documented.
|
|
21
36
|
|
|
@@ -25,8 +40,26 @@ Not documented.
|
|
|
25
40
|
### `reloading_enabled?(config)` <a id="method-c-reloading_enabled-3F"></a> <a id="reloading_enabled?-class_method"></a>
|
|
26
41
|
- **@return** [Boolean]
|
|
27
42
|
|
|
43
|
+
### `rspec_rails_version()` <a id="method-c-rspec_rails_version"></a> <a id="rspec_rails_version-class_method"></a>
|
|
44
|
+
Not documented.
|
|
45
|
+
|
|
28
46
|
### `validate_application!()` <a id="method-c-validate_application-21"></a> <a id="validate_application!-class_method"></a>
|
|
29
47
|
- **@raise** [Error]
|
|
30
48
|
|
|
49
|
+
### `validate_rspec!(project:)` <a id="method-c-validate_rspec-21"></a> <a id="validate_rspec!-class_method"></a>
|
|
50
|
+
Validate the seam after an RSpec Rails helper has loaded. RSpec owns requiring
|
|
51
|
+
rspec/rails and configuring its example groups; this method only checks that
|
|
52
|
+
that setup is attached to the same, already-validated Rails application.
|
|
53
|
+
- **@raise** [Error]
|
|
54
|
+
|
|
55
|
+
### `validate_rspec_driver!(example_metadata)` <a id="method-c-validate_rspec_driver-21"></a> <a id="validate_rspec_driver!-class_method"></a>
|
|
56
|
+
RSpec Rails invokes this at example execution time, before the example can ask
|
|
57
|
+
Capybara to launch a browser. The adapter converts this explicit rejection
|
|
58
|
+
into an incomplete/error execution result.
|
|
59
|
+
- **@raise** [Error]
|
|
60
|
+
|
|
31
61
|
### `validate_test_environment()` <a id="method-c-validate_test_environment"></a> <a id="validate_test_environment-class_method"></a>
|
|
32
62
|
- **@raise** [Error]
|
|
63
|
+
|
|
64
|
+
### `validate_version_tuple!(rails_metadata)` <a id="method-c-validate_version_tuple-21"></a> <a id="validate_version_tuple!-class_method"></a>
|
|
65
|
+
- **@raise** [Error]
|
data/doc/Branchproof/Report.md
CHANGED
|
@@ -60,5 +60,8 @@ Not documented.
|
|
|
60
60
|
- **@raise** [ArgumentError]
|
|
61
61
|
- **@return** [Report] a new instance of Report
|
|
62
62
|
|
|
63
|
+
### `rerun_command(test_id)` <a id="method-i-rerun_command"></a> <a id="rerun_command-instance_method"></a>
|
|
64
|
+
Not documented.
|
|
65
|
+
|
|
63
66
|
### `write(io:, format:)` <a id="method-i-write"></a> <a id="write-instance_method"></a>
|
|
64
67
|
- **@raise** [ArgumentError]
|
data/doc/Branchproof/Runtime.md
CHANGED
|
@@ -108,6 +108,9 @@ Metrics/PerceivedComplexity
|
|
|
108
108
|
### `snapshot()` <a id="method-c-snapshot"></a> <a id="snapshot-class_method"></a>
|
|
109
109
|
Not documented.
|
|
110
110
|
|
|
111
|
+
### `test_phase_counts()` <a id="method-c-test_phase_counts"></a> <a id="test_phase_counts-class_method"></a>
|
|
112
|
+
Not documented.
|
|
113
|
+
|
|
111
114
|
### `value_path(decision_id, value, domain)` <a id="method-c-value_path"></a> <a id="value_path-class_method"></a>
|
|
112
115
|
rubocop:disable-next Metrics/MethodLength -- trace state branches are
|
|
113
116
|
explicit. rubocop:disable-next Metrics/AbcSize, Metrics/CyclomaticComplexity,
|
data/doc/Branchproof/Worker.md
CHANGED
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
| --- | --- |
|
|
5
5
|
| **Defined in** | lib/branchproof/worker.rb |
|
|
6
6
|
|
|
7
|
-
Runs one isolated
|
|
7
|
+
Runs one isolated test worker and atomically exports its result.
|
|
8
8
|
|
|
9
9
|
## Public Class Methods
|
|
10
|
+
### `adapter_for(project, runtime)` <a id="method-c-adapter_for"></a> <a id="adapter_for-class_method"></a>
|
|
11
|
+
Not documented.
|
|
12
|
+
|
|
10
13
|
### `boot_project(project)` <a id="method-c-boot_project"></a> <a id="boot_project-class_method"></a>
|
|
11
14
|
Not documented.
|
|
12
15
|
|
|
@@ -17,6 +20,10 @@ Not documented.
|
|
|
17
20
|
This result boundary intentionally carries the complete worker payload.
|
|
18
21
|
rubocop:disable-next Metrics/ParameterLists
|
|
19
22
|
|
|
23
|
+
### `guard_late_rspec_execution(adapter, payload)` <a id="method-c-guard_late_rspec_execution"></a> <a id="guard_late_rspec_execution-class_method"></a>
|
|
24
|
+
Installed before application hooks, so this runs after their at_exit work. A
|
|
25
|
+
rescued second runner must still invalidate the already-exported result.
|
|
26
|
+
|
|
20
27
|
### `incomplete_evidence(evidence, diagnostics)` <a id="method-c-incomplete_evidence"></a> <a id="incomplete_evidence-class_method"></a>
|
|
21
28
|
Not documented.
|
|
22
29
|
|
data/doc/Branchproof.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
| | |
|
|
4
4
|
| --- | --- |
|
|
5
|
-
| **Defined in** | lib/branchproof.rb, lib/branchproof/cli.rb, lib/branchproof/limits.rb, lib/branchproof/loader.rb, lib/branchproof/report.rb, lib/branchproof/source.rb, lib/branchproof/worker.rb, lib/branchproof/project.rb, lib/branchproof/records.rb, lib/branchproof/runtime.rb, lib/branchproof/version.rb, lib/branchproof/analyzer.rb, lib/branchproof/evidence.rb, lib/branchproof/minimizer.rb, lib/branchproof/comparison.rb, lib/branchproof/constraints.rb, lib/branchproof/instrumenter.rb, lib/branchproof/runtime_flow.rb, lib/branchproof/saved_report.rb, lib/branchproof/value_syntax.rb, lib/branchproof/rails_support.rb, lib/branchproof/value_runtime.rb, lib/branchproof/coverage_index.rb, lib/branchproof/decision_table.rb, lib/branchproof/default_syntax.rb, lib/branchproof/focused_report.rb, lib/branchproof/decision_syntax.rb, lib/branchproof/default_runtime.rb, lib/branchproof/exception_syntax.rb, lib/branchproof/iteration_syntax.rb, lib/branchproof/minitest_adapter.rb, lib/branchproof/comparison_report.rb, lib/branchproof/exception_runtime.rb, lib/branchproof/iteration_runtime.rb, lib/branchproof/flow_instrumentation.rb, lib/branchproof/value_instrumentation.rb, lib/branchproof/default_instrumentation.rb, lib/branchproof/exception_instrumentation.rb, lib/branchproof/iteration_instrumentation.rb, lib/branchproof/extended_alternative_runtime.rb |
|
|
5
|
+
| **Defined in** | lib/branchproof.rb, lib/branchproof/cli.rb, lib/branchproof/limits.rb, lib/branchproof/loader.rb, lib/branchproof/report.rb, lib/branchproof/source.rb, lib/branchproof/worker.rb, lib/branchproof/project.rb, lib/branchproof/records.rb, lib/branchproof/runtime.rb, lib/branchproof/version.rb, lib/branchproof/analyzer.rb, lib/branchproof/evidence.rb, lib/branchproof/minimizer.rb, lib/branchproof/comparison.rb, lib/branchproof/constraints.rb, lib/branchproof/instrumenter.rb, lib/branchproof/runtime_flow.rb, lib/branchproof/saved_report.rb, lib/branchproof/value_syntax.rb, lib/branchproof/rails_support.rb, lib/branchproof/rspec_adapter.rb, lib/branchproof/value_runtime.rb, lib/branchproof/coverage_index.rb, lib/branchproof/decision_table.rb, lib/branchproof/default_syntax.rb, lib/branchproof/focused_report.rb, lib/branchproof/decision_syntax.rb, lib/branchproof/default_runtime.rb, lib/branchproof/exception_syntax.rb, lib/branchproof/iteration_syntax.rb, lib/branchproof/minitest_adapter.rb, lib/branchproof/comparison_report.rb, lib/branchproof/exception_runtime.rb, lib/branchproof/iteration_runtime.rb, lib/branchproof/flow_instrumentation.rb, lib/branchproof/value_instrumentation.rb, lib/branchproof/default_instrumentation.rb, lib/branchproof/exception_instrumentation.rb, lib/branchproof/iteration_instrumentation.rb, lib/branchproof/extended_alternative_runtime.rb |
|
|
6
6
|
|
|
7
7
|
Keep source-boundary and parameter-binding rules together for auditing.
|
|
8
8
|
rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity,
|
|
@@ -43,6 +43,13 @@ Not documented.
|
|
|
43
43
|
- [Branchproof/Minimizer.md](Branchproof/Minimizer.md)
|
|
44
44
|
- [Branchproof/MinitestAdapter.md](Branchproof/MinitestAdapter.md)
|
|
45
45
|
- [Branchproof/Project.md](Branchproof/Project.md)
|
|
46
|
+
- [Branchproof/RSpecAdapter/ClassRunnerGuard.md](Branchproof/RSpecAdapter/ClassRunnerGuard.md)
|
|
47
|
+
- [Branchproof/RSpecAdapter/ContextLifecycle.md](Branchproof/RSpecAdapter/ContextLifecycle.md)
|
|
48
|
+
- [Branchproof/RSpecAdapter/DefaultDiscovery.md](Branchproof/RSpecAdapter/DefaultDiscovery.md)
|
|
49
|
+
- [Branchproof/RSpecAdapter/ExampleLifecycle.md](Branchproof/RSpecAdapter/ExampleLifecycle.md)
|
|
50
|
+
- [Branchproof/RSpecAdapter/RunnerGuard.md](Branchproof/RSpecAdapter/RunnerGuard.md)
|
|
51
|
+
- [Branchproof/RSpecAdapter/UnsupportedRunner.md](Branchproof/RSpecAdapter/UnsupportedRunner.md)
|
|
52
|
+
- [Branchproof/RSpecAdapter.md](Branchproof/RSpecAdapter.md)
|
|
46
53
|
- [Branchproof/RailsSupport/Error.md](Branchproof/RailsSupport/Error.md)
|
|
47
54
|
- [Branchproof/RailsSupport.md](Branchproof/RailsSupport.md)
|
|
48
55
|
- [Branchproof/Records.md](Branchproof/Records.md)
|
data/doc/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.10.0] - 2026-09-21
|
|
4
|
+
|
|
5
|
+
- Add the first-release RSpec execution path for plain Ruby and Rails projects.
|
|
6
|
+
It supports RSpec 3.13, including Rails 8.1 with rspec-rails 8.x on CRuby 3.4.
|
|
7
|
+
Integration is verified against rspec-rails 8.0.4 and native RSpec behavior.
|
|
8
|
+
- Add `--framework auto|minitest|rspec`, native RSpec discovery that respects
|
|
9
|
+
exclusions and custom patterns, full-description labels, and status mapping for pending,
|
|
10
|
+
skipped, fixed pending, and failed examples.
|
|
11
|
+
- Keep Rails helper ownership with the application after Branchproof's loader;
|
|
12
|
+
transaction behavior, in-process specs, and context/suite/unattributed
|
|
13
|
+
evidence are recorded explicitly.
|
|
14
|
+
- Allow focused pure-Ruby specs inside Rails projects without requiring Rails boot.
|
|
15
|
+
- Match RSpec examples across saved reports only when spec and declaration
|
|
16
|
+
revisions agree, preventing false matches after examples are inserted or reordered.
|
|
17
|
+
- Stream test progress to stderr, show quoted RSpec rerun commands, and explain
|
|
18
|
+
unmatched test globs, empty suites, and filters selecting no examples.
|
|
19
|
+
- Document repeated ordinary and shared-example benchmarks with allocations
|
|
20
|
+
and peak process memory; end-to-end overhead remains substantial.
|
|
21
|
+
|
|
3
22
|
## [0.9.0] - 2026-09-18
|
|
4
23
|
|
|
5
24
|
- Measure contextual predicates, guarded pattern selection, dynamic case splat
|