jnunemaker/httparty — pull request #358 by rusikf (2014-12-17 15:59:13+00:00)
Title: fix bin/httparty + cucumber tests for it

It looks, that there is no tests for ```bin/httparty```, so i created tests for it.
__Changes:__
Without
```ruby
puts JSON.pretty_generate(response.delegate)
```
tests are failed ( delegate method is undefined)

For testing bin/httparty i am using [aruba - cucumber extension for testing command line apps](https://github.com/cucumber/aruba).

We need explicitly run port in featurers:
```ruby
Scenario: Make a get request
Given a remote deflate service on port '4001'
```
so, i run mongrel server each scenario with different port for each scenario
```ruby
Given /^a remote deflate service on port '(\d+)'/ do |port|
run_server(port)
@handler = DeflateHandler.new
end
```
Notice: On other tests(which are now on master branch), different port are assigned too for each scenario, but implicitly here:
```ruby
def new_port
server = TCPServer.new('0.0.0.0', nil)
port = server.addr[1]
ensure
server.close
end
```
Also i update cucumber to stable release, and move it to test group in Gemfile because there are a lot of changes since 0.7 cucumber version.
```ruby
@server.stop if @server
```
Condition here needed because i don't start server and don't initialze @server in first scenario:
```ruby
Scenario: Show help information
When I run `httparty --help`
Then the output should contain "-f, --format [FORMAT]"
```