Forum: RSpec Gems installation

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F1e1789ff9e7fc3032fa6cf15382a1e8?d=identicon&s=25 Juanma Cervera (jmcervera)
on 2008-10-27 15:54
Hello.

I have a problem trying to use cucumber with webrat.
I thought I could use the gems versions of rspec, rspec-rails, cucumber
and webrat, in fact I think that I could manage to do it two weeks ago,
but now that I updated the versions of the rspec, rspec-rails and
cucumber, I am getting a errors like this

undefined method `visits' for
#<ActionController::Integration::Session:0xb702e6a0> (NoMethodError)

for all the webrat methods.

Am I right.? Can I use webrat via the gem.? Or do I have to install
webrat in vendor/plugins directory.?

Thanks
07dd367bcc4ae602d640ec8c1b280df6?d=identicon&s=25 Mark Thomson (Guest)
on 2008-10-28 04:33
(Received via mailing list)
The webrat gem works for me. Do you have "require 'webrat'" in your
features/steps/env.rb file?

Mark.
F1e1789ff9e7fc3032fa6cf15382a1e8?d=identicon&s=25 Juanma Cervera (jmcervera)
on 2008-10-28 09:28
Thanks Mark
That was the problem

Mark Thomson wrote:
> The webrat gem works for me. Do you have "require 'webrat'" in your
> features/steps/env.rb file?
>
> Mark.
Cdf378de2284d8acf137122e541caa28?d=identicon&s=25 Matt Wynne (mattwynne)
on 2008-10-28 16:56
(Received via mailing list)
Last time I looked, webrat is only patched in when you're running with
RAILS_ENV == "test". Are you definitely doing that?
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 aslak hellesoy (Guest)
on 2008-10-30 04:38
(Received via mailing list)
On Mon, Oct 27, 2008 at 3:54 PM, Juanma Cervera <lists@ruby-forum.com>
wrote:
>
> for all the webrat methods.
>
> Am I right.? Can I use webrat via the gem.? Or do I have to install
> webrat in vendor/plugins directory.?
>

Do you require 'webrat' anywhere?
92176b1491cb2f87c81139fda71fd277?d=identicon&s=25 Hans de Graaff (Guest)
on 2008-10-30 04:40
(Received via mailing list)
On Mon, 2008-10-27 at 15:54 +0100, Juanma Cervera wrote:

> I have a problem trying to use cucumber with webrat.
> I thought I could use the gems versions of rspec, rspec-rails, cucumber
> and webrat, in fact I think that I could manage to do it two weeks ago,
> but now that I updated the versions of the rspec, rspec-rails and
> cucumber, I am getting a errors like this
>
> undefined method `visits' for
> #<ActionController::Integration::Session:0xb702e6a0> (NoMethodError)

I just ran into this myself. I added a "require 'webrat'" to env.rb to
fix it.

Kind regards,

Hans
This topic is locked and can not be replied to.