[rspec-users] Webrat integration with Rspec and Rake tasks

Ed Howland ed.howland at gmail.com
Tue Feb 19 13:32:06 EST 2008


Hi,

I am trying to get Webrat integrated with RSpec. I've followed the
steps in the various blog posts about this, but have one sniggling
little issue. It might be a Webrat issue, but I am hoping the RSpec
folks might have already solved it.

I have the stories run from a Rake task  (am hoping for one of these
in the main rspec rake task soon,) ut to run webrat stuff in the
steps, you need to:

rake spec:stories RAILS_ENV=test.

The reason is due to the boot order of rake and plugins (of which
webrat and rspec are ones), webrat/init.rb doesn't attach itself to
ActionController::Integration::Session unless it is on the test
environment. Only setting the RAILS_ENV ahead of the boot sequence
fixes this. But I am wondering if there is another alternative.

Also, has anyone gotten it to run with autotest?

Thanks in advance.

Ed




-- 
Ed Howland
http://greenprogrammer.blogspot.com
"The information transmitted is intended only for the person or entity
to which it is addressed and may contain proprietary, confidential
and/or legally privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this information by persons or entities other than the intended
recipient is prohibited. If you received this in error, please contact
the sender and delete the material from all computers."


More information about the rspec-users mailing list