Test-drive the development of your command-line applications
summary
Builds a dotfiles installer called full_stop from a methadone template, wires up Cucumber + Aruba to run acceptance scenarios, and uses unit tests with mocks to simulate failures. Tests set HOME environment to a temp dir so cloning and symlinking never touch the real home. Replaces backtick shells with system, extracts a CLI class, adds optionparser help, wraps operations in exceptions and a sh! helper. Result: green features and unit tests and a refactor that keeps behavior intact.
AI-written summary · about
chapters (6)
- 0:00Start
- 3:22Challenges for CLI
- 3:52CLI apps tend to be implemented on production
- 21:26Horrible backtrace
- 28:04Start with a template project
- 28:29Get to unit tests
related talks
36mCLI applications & TDD: Never write scripts again
31mStop writing scripts! CLI applications with TDD
26mA Unit Test Would Have Caught This...
38mFlorian Rappl: Testing CLI Utilities
27mTDDing tmux
26mTales from the QA Crypt
08mExample-driven development: bridging tests and documentation
40mAutomated acceptance tests for terminal applications
