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
- response.should redirect_to / render_template as normal
- response.should have_been_success (i do not want to overwrite be_success…)
script/plugin install git://github.com/grosser/rspec_response_enhancer.git add to spec/spec_helper.rb: Spec::Runner.configure do |config| ... config.include(RspecResponseEnhancer) ... end
And as added benefit you no longer need to build should be_success when you already have a should render_template, since render_template now gives detailed error messages!