README.md in aruba-0.6.1 vs README.md in aruba-0.6.2

- old
+ new

@@ -1,6 +1,9 @@ -[![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) +[![Build Status](https://travis-ci.org/cucumber/aruba.png)](http://travis-ci.org/cucumber/aruba) +[![Gem Version](https://badge.fury.io/rb/aruba.svg)](http://badge.fury.io/rb/aruba) +[![Dependency Status](https://gemnasium.com/cucumber/aruba.png)](https://gemnasium.com/cucumber/aruba.png) +[![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 @@ -30,33 +33,41 @@ 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' + ``` + require 'aruba/api' + require 'aruba/reporting' - RSpec.configure do |c| - c.include Aruba::Api - c.after(:each) do - restore_env - end + RSpec.configure do |config| + config.include Aruba::Api + + config.before(:each) do + restore_env + clean_current_dir end - ``` + end + ``` +3. Add the following to your `spec/spec_helper.rb` + ``` + Dir.glob(::File.expand_path('../support/*.rb', __FILE__)).each { |f| require_relative f } + ``` + + ## API -`aruba` provides a wonderfull api to be used in your tests: +`aruba` provides a wonderful API to be used in your tests: * Creating files/directories * Deleting files/directories * Checking file size * Checking file existence/absence * ... -A full documentation of the api can be found [here](http://www.rubydoc.info/github/cucumber/aruba/master/frames). +A full documentation of the API can be found [here](http://www.rubydoc.info/github/cucumber/aruba/master/frames). ## Configuration Aruba has some default behaviour that you can change if you need to. @@ -71,21 +82,21 @@ end ``` ### Modify the PATH -Aruba will automatically add the `bin` directory of your project to the `PATH` environment variable for +Aruba will automatically add the `bin` directory of your project to the `PATH` environment variable for the duration of each Cucumber scenario. So if you're developing a Ruby gem with a binary command, you can test those commands as though the gem were already installed. If you need other directories to be added to the `PATH`, you can put the following in `features/support/env.rb`: ENV['PATH'] = "/my/special/bin/path#{File::PATH_SEPARATOR}#{ENV['PATH']}" ### Increasing timeouts -A process sometimes takes longer than expected to terminate, and Aruba will kill them off (and fail your scenario) if it is still alive after 3 seconds. If you need more time you can modify the timeout by assigning a different value to `@aruba_timeout_seconds` in a `Before` block: +A process sometimes takes longer than expected to terminate, and Aruba will kill them off (and fail your scenario) if it is still alive after 3 seconds. If you need more time you can modify the timeout by assigning a different value to `@aruba_timeout_seconds` in a `Before` block: ```ruby Before do @aruba_timeout_seconds = 5 end @@ -260,10 +271,10 @@ ```gherkin Scenario: Make tea ## Making tea * Get a pot * And some hot water - + Given... ``` You'd write: