[rspec-users] 1.05 to 1.08

David Chelimsky dchelimsky at gmail.com
Mon Sep 3 23:44:51 EDT 2007


On 9/3/07, Shane Mingins <smingins at elctech.com> wrote:
> Hi
>
> We are looking at moving a project over from 1.05 to 1.08 but have a problem
> with some of our helper specs
>
> They work fine in 1.05 but error in 1.08 and it is the calls to route helper
> methods that seems to be the problem.
>
> I did some playing around .. because the code being tested is reasonably
> large etc ... but this sample (using the peepcode app) seems to boil down
> the problem
>
> describe WeathersHelper do
>   it do
>     weather = Weather.new
>     weather.id = 1
>     weather_path(weather).should == "/weathers/1"
>   end
> end
>
> This passes in 1.05 and throws an exception in 1.08 ... is seems that the
> route helper method is not available.
>
> BTW, in our actual code the call to weather_path is in the helper ... I just
> put it in the above for simplicity.
>
> So I am wondering what may have changed and what do I need to configure??

I am going to guess that it's something like this:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.<<

If not, please post the error (good idea to do that in general).

If so, this is fixed in trunk. Attached is a patch you can use to
address it in your rails app (apply from vendor/plugins)

Please let us know if this fixes the problem.

Cheers,
David

>
> Thanks
> Shane
>
>
>
> Shane Mingins
> ELC Technologies (TM)
> PO Box 247
> Santa Barbara, CA 93102
>
> Phone: +64 4 568 6684
> Mobile: +64 21 435 586
> Email:  smingins at elctech.com
> AIM:     ShaneMingins
> Skype: shane.mingins
>
> (866) 863-7365 Tel - Santa Barbara Office
> (866) 893-1902 Fax - Santa Barbara Office
>
> +44 020 7504 1346 Tel - London Office
> +44 020 7504 1347 Fax - London Office
>
> http://www.elctech.com
>
> --------------------------------------------------------------------
> Privacy and Confidentiality Notice:
> The information contained in this electronic mail message is intended for
> the named recipient(s) only. It may contain privileged and confidential
> information. If you are not an intended recipient, you
> must not copy, forward, distribute or take any action in reliance on it. If
> you have received this electronic mail message in error, please notify the
> sender immediately.
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: helper_bug_fix.patch
Type: application/octet-stream
Size: 618 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rspec-users/attachments/20070903/76e8278e/attachment.obj 


More information about the rspec-users mailing list