On Oct 14, 2011, at 4:17 AM, Gordon Yeong wrote:

> 
> :type => :controller will only include it in controller specs. If you want to 
> include them in requests, you need to add this:
> 
> config.extend ControllerMacros, :type => :requests
> 
> In the past,  when I tried to have them in model and controller, I did 
> config.extend ControllerMacros, :type => [ :view, :controller ] to no success.
> how about if I wanted to have them available to model, controller, view and 
> requests?  

You have to declare each type separately. This changed in rspec-2 due to the 
way we do filtering. It's way, way more flexible, but it also requires more 
generic handling of key/value pairs, which means we'd have to special-case 
:type, which is a road I'd be very hesitant to head down.

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" 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/rspec?hl=en.

Reply via email to