On 4/09/2007, at 3:44 PM, David Chelimsky wrote: > On 9/3/07, Shane Mingins <[EMAIL PROTECTED]> 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 >
Hi David 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 ;-) Cheers Shane _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users