tim-vandecasteele/grape-swagger — pull request #45 by dblock (2013-06-20 21:35:22+00:00)
Title: Be more specific in specs, use JSON output.

The current specs retrieve a hash in a string format from the API, comparing a giant blob. This doesn't let us be very specific about the specs. For example:

``` ruby
it "retrieves the given base-path on /swagger_doc" do
get '/swagger_doc'
last_response.body.should == "... long hash converted into a string"
end
```

A much better spec would be to look for the specific thing being tested, in this case that the base path has been changed to the value defined by a grape-swagger parameter.

```
get '/swagger_doc.json'
JSON.parse(last_response.body)["basePath"].should == SimpleApiWithBasePath::NON_DEFAULT_BASE_PATH
```

Bonus:

* Added Ruby 2.x to Travis CI.
* Colorized RSpec output.
* Upgraded to Grape 0.5.0, latest.