rubyonrailsin

A Ruby and Rails talk

Wednesday, March 31, 2010


[Rails] Re: undefined local variable or method `request'—in test

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Any thoughts on this one guys?

Thanks

On Mar 30, 5:03 pm, elliottg <x...@simplecircle.net> wrote:
> I am working on a small gem patch... The code in question is in a
> module within /lib. I am calling request.env['HTTP_REFERER'] and
> getting the desired results as implementation in the dev env.
>
> However, when I run my RSpec spec, I get:
> undefined local variable or method `request' for
> #<Spec::Example::ExampleGroup::Subclass_1::Subclass_1:0x10057d518>
>
> I am assuming that somehow "request" is not getting initialized when
> in the test env. etc... Coming from the test/unit and Shoulda world, I
> know very little about RSpec, perhaps this is playing a role in my
> problem as well.
>
> Any insight here?
>
> Thanks!
> Elliott G

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive