Hi folks. I’m currently using rspec-2.4.0 and rspec-rails-2.4.1.
In the controller I have the code like this (at least at two different
raise Exception if some_falsy_value
@message = ‘Error’
but when I do testing with rspec this exception doesn’t proceeded by
controller, and I’m getting the following:
- SignupsController GET confirm_email should proceed unexpected
Failure/Error: get :confirm_email, @params
./spec/controllers/signups_controller_spec.rb:168:in `block (3
levels) in <top (required)>’
I saw in examples that we can do exceptions catching by contoller
like (rescue_from ActiveRecord::RecordNotFound, :with =>
but I don’t want to use this way, con my exceptions aren’t controller
they only related to some single action.
Also, it’s my first email to mailing group, if I composed it
someone please let me know.