Specifying which spec types helper modules get included into in the RSpec.configure block

Hi folks,

Using Rails 3.0.0.rc & RSpec 2.0.0.beta.19

I’m trying to specify what type of specs helper modules get included
into such as below:

config.include Devise::TestHelpers, :type => :controller

When I run the controller specs I get undefined method ‘sign_in’ which
tells me that the helpers aren’t getting included.

If I remove the :type => :controller hash from the statement, the
module is included ok (into all spec types) and the specs pass.

Am I doing something wrong or has the syntax for specifying which spec
types the modules get included into changed?

Thanks

Simon

On Jul 30, 9:14 am, S Bennett [email protected] wrote:

Am I doing something wrong or has the syntax for specifying which spec
types the modules get included into changed?

I have the same problem. I filed an issue:

On Tue, Aug 10, 2010 at 3:47 PM, John Firebaugh
[email protected] wrote:

On Jul 30, 9:14 am, S Bennett [email protected] wrote:

Am I doing something wrong or has the syntax for specifying which spec
types the modules get included into changed?

I have the same problem. I filed an issue:

config.include/extend no longer respect :type option · Issue #159 · rspec/rspec-rails · GitHub

It’s been fixed, and the fix will be part of the next release (next week
or so).