<commit_before>[![Build Status](https://travis-ci.org/cucumber/aruba.png)](http://travis-ci.org/cucumber/aruba) [![Code Climate](https://codeclimate.com/github/cucumber/aruba.png)](https://codeclimate.com/github/cucumber/aruba)

Aruba is Cucumber extension for testing command line applications written in any programming language. Features at a glance:

* Test any command line application
* Manipulate the file system
* Create great HTML documentation based on your own Cucumber scenarios

## Usage

### Cucumber

If you have a `Gemfile`, add `aruba`. Otherwise, install it like this:

    gem install aruba

Then, `require` the library in one of your ruby files under `features/support` (e.g. `env.rb`)

```ruby
require 'aruba/cucumber'
```

You now have a bunch of step definitions that you can use in your features. Look at [`lib/aruba/cucumber.rb`](lib/aruba/cucumber.rb)
to see them all. Look at [`features/*.feature`](features/) for examples (which are also testing Aruba
itself).

### RSpec

Originally written for `cucumber`, `aruba` can be helpful in other contexts as
well. One might want to use it together with `rspec`.

1. Create a directory named `spec/support`
2. Create a file named `spec/support/aruba.rb` with:

   ```
   require 'aruba/api
   require 'aruba/reporting'

    RSpec.configure do |c|
      c.include Aruba::Api
      c.after(:each) do
        restore_env
      end<commit_msg>Add missing single-quote to RSpec example<commit_after>[![Build Status](https://travis-ci.org/cucumber/aruba.png)](http://travis-ci.org/cucumber/aruba) [![Code Climate](https://codeclimate.com/github/cucumber/aruba.png)](https://codeclimate.com/github/cucumber/aruba)

Aruba is Cucumber extension for testing command line applications written in any programming language. Features at a glance:

* Test any command line application
* Manipulate the file system
* Create great HTML documentation based on your own Cucumber scenarios

## Usage

### Cucumber

If you have a `Gemfile`, add `aruba`. Otherwise, install it like this:

    gem install aruba

Then, `require` the library in one of your ruby files under `features/support` (e.g. `env.rb`)

```ruby
require 'aruba/cucumber'
```

You now have a bunch of step definitions that you can use in your features. Look at [`lib/aruba/cucumber.rb`](lib/aruba/cucumber.rb)
to see them all. Look at [`features/*.feature`](features/) for examples (which are also testing Aruba
itself).

### RSpec

Originally written for `cucumber`, `aruba` can be helpful in other contexts as
well. One might want to use it together with `rspec`.

1. Create a directory named `spec/support`
2. Create a file named `spec/support/aruba.rb` with:

   ```
   require 'aruba/api'
   require 'aruba/reporting'

    RSpec.configure do |c|
      c.include Aruba::Api
      c.after(:each) do
        restore_env
      end
{'fraction_non_alphanumeric': 0.11232011232011233, 'fraction_numerical': 0.001404001404001404, 'mean_word_length': 4.04424778761062, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '435984', 'n_tokens_mistral': 902, 'n_tokens_neox': 875, 'n_words': 318}