I have a view with some javascript that does page redirection, and I
wanted to confirm that under certain circumstances the user will get a
500 error from CanCan::AccessDenied.

It seems that when I am not using :js => true, I can do:

page.status_code.shoud be 500

but.. when I try that in a :js => true example group, I get:
Capybara::NotSupportedByDriverError: Capybara::NotSupportedByDriverError

also the request and response objects are nil in the context of this
test...  My dirty workaround has just been to do:

page.has_content "CanCan::AccessDenied"

Which serves my purposes, but I was hoping for a better way...  Any
ideas?

Thank you.

Patrick J. Collins
http://collinatorstudios.com

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to