Browse files

Merge pull request #30 from xunker/master

updated readme to include info on rspec post and the default_version method
  • Loading branch information...
2 parents b86d1c8 + 1b57550 commit 04822cf069b4ceb1f2fd6d263ac45aa469a28167 @Sutto committed Sep 15, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0
@@ -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:
+# 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:
+describe YourAwesomeController do
+ default_version 1
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`.

0 comments on commit 04822cf

Please sign in to comment.