So, for helper specs, one must now do something like:

describe SomeHelper do

  include SomeHelper

  before(:each) do
  ...
  end

  it "should do something"

end

That seems redundant, but I suppose there's a good reason for it.

Thanks for the help, Pat!

Regards, Lori

On 23-May-08, at 4:23 PM, Pat Maddox wrote:

RSpec currently includes the described module so that you can call
methods directly. It will no longerdo that automatically, so you'll
have to manually include the module if you want these direct calls.

Rails helpers are defined in modules, so that's why this is showing up.

Pat
On 5/23/08, Pat Maddox <[EMAIL PROTECTED]> wrote:
It appears when you write a spec like

describe FooModule do ...

Pat


On 5/23/08, Lori M Olson <[EMAIL PROTECTED]> wrote:
Can anyone (David?) shed some light on what exactly this warning is
complaining about?  I started seeing it when I upgraded to Rails 2.1
RC1 and the latest RSpec from git.

I'm getting it in some helper specs that I'm writing.  And yes, I am
including a module there, to reuse some utility methods I originally
wrote for my controller tests (I'm switching to specs as fast as I
can, but I don't have time to re-jigger all my tests over to specs yet).

Regards, Lori




_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users


_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to