[rspec-users] 1.05 to 1.08
smingins at elctech.com
Tue Sep 4 00:40:42 EDT 2007
On 4/09/2007, at 3:44 PM, David Chelimsky wrote:
> On 9/3/07, Shane Mingins <smingins at elctech.com> wrote:
>> 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
>> 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"
>> 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
> 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.
Thank you .. yes that fixed that problem, although it looks like I
have other's to look at regarding routes.
Sorry I did not post error message ... I did not think it was such a
useful message ;-)
More information about the rspec-users