Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated readme to include info on rspec post and the default_version …

…method
  • Loading branch information...
commit 1b57550409280d032795f91536592d2daf9327be 1 parent b86d1c8
@xunker xunker authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.md
View
12 README.md
@@ -507,11 +507,23 @@ The only difference one needs to take into the account is the need to specify th
parameter on any http requests, e.g:
```ruby
+# get
get :index, :version => 1
+
+# post
+post :index, :version => 1, :payload => { :foo => 'bar' ... }
```
Otherwise it will raise an exception.
+To set the version to be used for all tests in a given set of specs you can use the `default_version` tag. It will set the version for all tests in that block and not require `:version` to be set individually:
+
+```ruby
+describe YourAwesomeController do
+ default_version 1
+end
+```
+
RocketPants includes a set of helpers to make testing controllers built on `RocketPants::Base` simpler.
* `be_singular_resource` - Checks the response is a single resource - e.g. `response.should be_singular_resource`.
Please sign in to comment.
Something went wrong with that request. Please try again.