README.md in airborne-0.0.21 vs README.md in airborne-0.0.22
- old
+ new
@@ -136,35 +136,25 @@
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:
+If you're testing an API you've written in Rails, Airborne plays along with `rspec-rails`:
-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
+RSpec.describe HomeController, :type => :controller do
+ describe "GET index" do
it "returns correct types" do
- airborne_get '/foo/bar.json'
+ get :index, :format => 'json' #if your route responds to both html and 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
* `expect_json_keys` - Tests the existence of the specified keys in the JSON object