Re: [rspec-users] Specs for controllers and rescue_from

2010-11-24 Thread Nick
On Nov 21, 5:02 pm, David Chelimsky wrote: > http://relishapp.com/rspec/rspec-rails/v/2-1/dir/controller-specs/ano... Fantastic. Thanks, David! ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Specs for controllers and rescue_from

2010-11-21 Thread David Chelimsky
On Nov 20, 2010, at 10:12 PM, Nick Hoffman wrote: > Hey guys. My ApplicationController rescues > Mongoid::Errors::DocumentNotFound errors like this: > > class ApplicationController < ActionController::Base > rescue_from Mongoid::Errors::DocumentNotFound, >:with => :resource_not_found >

Re: [rspec-users] Specs for controllers and rescue_from

2010-11-21 Thread Phillip Koebbe
I had a similar problem in the past (with RSpec 1.x). I tend to create what I call a BaseController in each namespace specifically for shared behavior. The best example of this is class Admin::BaseController < ApplicationController before_filter :require_logged_in before_filter :require