Test command-line applications with Cucumber, RSpec or Minitest
open sourceMITfree
Aruba is a Ruby extension for Cucumber, RSpec and Minitest for testing command-line applications written in any language, such as Bash, Python, Ruby or Java. Tests run commands and check their output and exit status, with helpers that manipulate the file system and the process environment much like shell tools do, and Aruba resets both between tests so no state leaks from one test to the next. It is part of the Cucumber open source project.
Problems it solves
- write automated tests for a command-line tool I built
- check a CLI's output and exit code from my Ruby test suite
- stop tests of a command-line app leaking files and environment changes into each other
Features
- Tests command-line applications written in any language
- Works with Cucumber, RSpec and Minitest
- File system and process environment helpers that behave like shell tools
- Resets the file system and environment between tests
- RSpec matchers for command output and files
Limitations
- Windows isn't fully supported: only the RSpec tests and some Cucumber scenarios run there1
Alternatives
The same job
These do what Aruba does.
