README.md in airborne-0.0.20 vs README.md in airborne-0.0.21
- old
+ new
@@ -132,11 +132,39 @@
Airborne.configure do |config|
config.rack_app = MySinatraApp
end
```
-Under the covers, Airborne uses [rack-test](https://github.com/brynary/rack-test) to make the requests. (Rails applications are still not working correctly, support for Rails will come soon!)
+Under the covers, Airborne uses [rack-test](https://github.com/brynary/rack-test) to make the requests.
+
+##Rails Applications
+
+If you're testing and API you've written in Rails, Airborne plays along with `rspec-rails` using the following setup:
+
+In your `spec/rails_helper.rb` file, change RSpec configure to Airborne configure, and set the `rack_app` configuration setting to your Rails Application:
+
+```ruby
+Airborne.configure do |config|
+ config.rack_app = Rails.application
+end
+```
+
+Then, in your actual tests, since `rspec-rails` already has `get`, `post`, `put`... functions, you need to use `airborne_get`, `airborne_post` instead:
+
+```ruby
+require 'rails_helper'
+
+RSpec.describe FooController, :type => :controller do
+ describe "GET bar" do
+ it "returns correct types" do
+ airborne_get '/foo/bar.json'
+ expect_json_types({foo: :string})
+ end
+ end
+end
+```
+Just like with all other Rack applications, Airborne uses [rack-test](https://github.com/brynary/rack-test) to make the requests.
##API
* `expect_json_types` - Tests the types of the JSON property values returned
* `expect_json` - Tests the values of the JSON property values returned
@@ -304,10 +332,10 @@
## License
The MIT License
-Copyright (c) 2014 brooklyndev, sethpollack
+Copyright (c) 2014 [brooklyndev](https://github.com/brooklynDev), [sethpollack](https://github.com/sethpollack)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.