Skip to content
Browse files

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

  • Loading branch information...
1 parent b86d1c8 commit 1b57550409280d032795f91536592d2daf9327be @xunker xunker committed
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 1b57550

Please sign in to comment.
Something went wrong with that request. Please try again.