sajad torkamani

What is Aruba?

Aruba is a testing framework that helps you test your command-line applications.

It can help you to:

  • Test CLI apps written in any programming language.
  • Manipulate the file system and process environment.
  • Run your tests inside a sandbox that’s reset between each test.

By default, Aruba runs your commands in a separate child process.


See docs.


Default home directory


This is set here.

Run command

run_command 'foo'

Create file

write_file 'file.txt', 'Hello Aruba!'

Assert stderr contains substring

expect(last_command_started).to have_output_on_stderr 'blah'

Assert exit code

expect(last_command_stopped).to have_exit_status 1