> If you do want those semantics (perhaps because you're inside one or
> more helper methods where it's not so convenient to just render and
> return) then it should be easy enough to recreate them with an around
> filter.
An around_filter with catch and yield would do the job. I hadn't
thought of that, thanks.
Or I might just let the exception bubble upwards to rescue_from, and
test the exception rather than the display. e.g. in Cucumber,
Then /^it should be forbidden if (.*)$/ do |thing|
assert_raises(Forbidden) { When thing }
end
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=.