Add CLI-level integration tests for pbm subcommands #1

Open
opened 2026-08-27 14:36:46 +00:00 by jared · 0 comments
Owner

Context

While wiring pbm init to the new GitignoreManager (session 2026-08-27), we found no CLI-level test exists for any subcommand — test/pb_mirror/cli_test.rb is absent. The init→GitignoreManager call is a one-liner in lib/pb_mirror/cli.rb exercised only indirectly; GitignoreManager itself is unit-tested (test/pb_mirror/gitignore_manager_test.rb, 52-run suite green).

Tasks

  • Add a CLI test harness (Thor invocation in a tmpdir)
  • Cover init end to end: writes .pbm.yml, updates .gitignore, prints warning when .pbm.yml is ignored
  • Extend to other subcommands as feasible

Origin

  • Trigger: implementing the pbm-init gitignore-management change in-session (user-approved follow-up)
  • Improvised this session: none — wiring shipped with unit coverage only
  • Chain: untested CLI wiring ← no CLI test harness exists ← DESIGN (test/ has only unit + one real-binary integration test; see repo test/ layout)
  • Root candidate: this ticket
## Context While wiring `pbm init` to the new GitignoreManager (session 2026-08-27), we found no CLI-level test exists for any subcommand — `test/pb_mirror/cli_test.rb` is absent. The init→GitignoreManager call is a one-liner in `lib/pb_mirror/cli.rb` exercised only indirectly; GitignoreManager itself is unit-tested (`test/pb_mirror/gitignore_manager_test.rb`, 52-run suite green). ## Tasks - [ ] Add a CLI test harness (Thor invocation in a tmpdir) - [ ] Cover `init` end to end: writes .pbm.yml, updates .gitignore, prints warning when .pbm.yml is ignored - [ ] Extend to other subcommands as feasible ## Origin - Trigger: implementing the pbm-init gitignore-management change in-session (user-approved follow-up) - Improvised this session: none — wiring shipped with unit coverage only - Chain: untested CLI wiring ← no CLI test harness exists ← DESIGN (test/ has only unit + one real-binary integration test; see repo test/ layout) - Root candidate: this ticket
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/pb-mirror#1
No description provided.