jonleighton/spring-commands-cucumber — pull request #7 by p0deje (2014-08-06 06:37:55+00:00)
Title: Replace Rake env variable handling with usual

Current, Rake-way env variable handling should not be applied, because `cucumber` itself doesn't work this way.

For example, to start cucumber in different environment, I had to do:

```bash
$ bin/spring cucumber RAILS_ENV=cucumber
```

While usual way would be:

```bash
$ RAILS_ENV=cucumber bin/spring cucumber
# or
$ export RAILS_ENV=cucumber
$ bin/spring cucumber
```

Instead of parsing arguments, spring-commands-cucumber should check for `ENV['RAILS_ENV']`. With this approach, you can automatically set environment by adding something like this to `config/spring.rb`:

```ruby
if ARGV.first == 'cucumber'
ENV['RAILS_ENV'] = 'cucumber'
end
```