Commit afd4daa
Migrate bundled module specs from mocha to rspec-mocks
The ci:modules rake task had silently been a no-op since commit 722532c
removed the per-module Rakefiles in July 2025. It iterated each bundled
module directory and shelled out to rake spec, which walked up to the top
level Rakefile and errored out because no spec task was defined there.
Rewrite ci:modules to invoke rspec directly, update each module spec_helper
to configure rspec-puppet with a proper module_path, migrate ~420
mocha-style call sites to rspec-mocks, refactor around(:each) +
Puppet.override wrappers into before(:each)/after(:each) push_context
pairs (rspec-mocks rejects double setup from around hooks running before
example.run), and drop mocha from the Gemfile.
Fix test bugs that were silently broken while ci:modules was a no-op:
rename pcp:// test targets to remote:// (pcp transport was removed from
openvox), delete two tests that exercised a dead pcp-only code path in
run_task / run_task_with, correct inventory.get_target typos to
get_targets, fix wait_until_available argument expectation, and require
bolt/target in the prompt spec_helper so Puppet type signatures load.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: nmburgan <13688219+nmburgan@users.noreply.github.com>1 parent 732ebf1 commit afd4daa
64 files changed
Lines changed: 1101 additions & 913 deletions
File tree
- bolt-modules
- boltlib/spec
- functions
- ctrl/spec
- functions/ctrl
- dir/spec
- functions/dir
- file/spec
- functions/file
- log/spec
- functions/log
- out/spec
- functions/out
- prompt/spec
- functions
- prompt
- system/spec
- bolt_spec_spec/spec
- modules
- aggregate/spec
- canary/spec
- puppetdb_fact/spec
- plans
- rakelib
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
0 commit comments