RSpec Response Enhancer plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install http://small-plugins.googlecode.com/svn/trunk/rspec_response_enhancer/
RspecResponseEnhancer
=====================
In case of failure the normal should be_redirect and its friends are far from helpful...
expected redirect? to return true, got false expected "new", got nil
Now you can have this:
Status should be redirect but was 200(success)
- rendered addresses/new
- Flash:
:error = Address contains errors!
- Errors:Errors on @address(Address):
City can't be blank
Install
=======
add to spec/spec_helper.rb:
... require 'rspec_response_enhancer' ... Spec::Runner.configure do |config| ... config.include(RSpecResponseEnhancer) ... end
Example
=======
response.should have_succeeded response.should have_been_success
have_failed+have_been_error have_missed+have_been_missing have_redirected+have_been_redirect
response.should redirect_to / render_template as normal
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: hardway, 6 months ago

