lardawge
2010-Nov-07 02:15 UTC
[rspec-users] WillPaginate::Collection not detectible in assigns?
I am transitioning a Rails 2 app to Rails 3, Rspec 2 and have several controller where I test collect.should be_an_instance_of(WillPaginate::Collection). The spec fails with "expected [object] to be an instance of WillPaginate::Collection". The class of the object in the controller is WillPaginate::Collection. What am I missing? Why is assigns not returning the actual object? Controller collection class is WillPaginate::Collection. Spec collection class is an Array. Thanks, ~Larry
David Chelimsky
2010-Nov-07 13:56 UTC
[rspec-users] WillPaginate::Collection not detectible in assigns?
On Nov 6, 2010, at 9:15 PM, lardawge wrote:> I am transitioning a Rails 2 app to Rails 3, Rspec 2 and have several > controller where I test collect.should > be_an_instance_of(WillPaginate::Collection). The spec fails with > "expected [object] to be an instance of WillPaginate::Collection". The > class of the object in the controller is WillPaginate::Collection. > What am I missing? Why is assigns not returning the actual object? > Controller collection class is WillPaginate::Collection. Spec > collection class is an Array.Please post the failing example and the full failure message (i.e. run with --backtrace so we can see the full backtrace).> Thanks, > ~Larry
lardawge
2010-Nov-08 17:26 UTC
[rspec-users] WillPaginate::Collection not detectible in assigns?
I created a sample app that this was repeatable in and would be happy to put it up on github... here is the gist of it: https://gist.github.com/667961 On Nov 7, 5:56?am, David Chelimsky <dchelim... at gmail.com> wrote:> On Nov 6, 2010, at 9:15 PM, lardawge wrote: > > > I am transitioning a Rails 2 app to Rails 3, Rspec 2 and have several > > controller where I test collect.should > > be_an_instance_of(WillPaginate::Collection). The spec fails with > > "expected [object] to be an instance of WillPaginate::Collection". The > > class of the object in the controller is WillPaginate::Collection. > > What am I missing? Why is assigns not returning the actual object? > > Controller collection class is WillPaginate::Collection. Spec > > collection class is an Array. > > Please post the failing example and the full failure message (i.e. run with --backtrace so we can see the full backtrace). > > > Thanks, > > ~Larry > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
lardawge
2010-Nov-08 17:40 UTC
[rspec-users] WillPaginate::Collection not detectible in assigns?
Ok, here is the entire example app: https://github.com/lardawge/will_paginate_failing_spec On Nov 7, 5:56?am, David Chelimsky <dchelim... at gmail.com> wrote:> On Nov 6, 2010, at 9:15 PM, lardawge wrote: > > > I am transitioning a Rails 2 app to Rails 3, Rspec 2 and have several > > controller where I test collect.should > > be_an_instance_of(WillPaginate::Collection). The spec fails with > > "expected [object] to be an instance of WillPaginate::Collection". The > > class of the object in the controller is WillPaginate::Collection. > > What am I missing? Why is assigns not returning the actual object? > > Controller collection class is WillPaginate::Collection. Spec > > collection class is an Array. > > Please post the failing example and the full failure message (i.e. run with --backtrace so we can see the full backtrace). > > > Thanks, > > ~Larry > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
David Chelimsky
2010-Nov-08 19:24 UTC
[rspec-users] WillPaginate::Collection not detectible in assigns?
Let''s stick w/ the github issue. No need to do this on two paths. Thx On Nov 8, 2010, at 11:26 AM, lardawge wrote:> I created a sample app that this was repeatable in and would be happy > to put it up on github... here is the gist of it: > > https://gist.github.com/667961 > > On Nov 7, 5:56 am, David Chelimsky <dchelim... at gmail.com> wrote: >> On Nov 6, 2010, at 9:15 PM, lardawge wrote: >> >>> I am transitioning a Rails 2 app to Rails 3, Rspec 2 and have several >>> controller where I test collect.should >>> be_an_instance_of(WillPaginate::Collection). The spec fails with >>> "expected [object] to be an instance of WillPaginate::Collection". The >>> class of the object in the controller is WillPaginate::Collection. >>> What am I missing? Why is assigns not returning the actual object? >>> Controller collection class is WillPaginate::Collection. Spec >>> collection class is an Array. >> >> Please post the failing example and the full failure message (i.e. run with --backtrace so we can see the full backtrace). >> >>> Thanks, >>> ~Larry >> >> _______________________________________________ >> rspec-users mailing list >> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
lardawge
2010-Nov-08 21:52 UTC
[rspec-users] WillPaginate::Collection not detectible in assigns?
Agreed. I switched to github when I realized there was a delay posting here... These came in through after that. On Nov 8, 11:24?am, David Chelimsky <dchelim... at gmail.com> wrote:> Let''s stick w/ the github issue. No need to do this on two paths. > > Thx > > On Nov 8, 2010, at 11:26 AM, lardawge wrote: > > > > > > > I created a sample app that this was repeatable in and would be happy > > to put it up on github... here is the gist of it: > > >https://gist.github.com/667961 > > > On Nov 7, 5:56 am, David Chelimsky <dchelim... at gmail.com> wrote: > >> On Nov 6, 2010, at 9:15 PM, lardawge wrote: > > >>> I am transitioning a Rails 2 app to Rails 3, Rspec 2 and have several > >>> controller where I test collect.should > >>> be_an_instance_of(WillPaginate::Collection). The spec fails with > >>> "expected [object] to be an instance of WillPaginate::Collection". The > >>> class of the object in the controller is WillPaginate::Collection. > >>> What am I missing? Why is assigns not returning the actual object? > >>> Controller collection class is WillPaginate::Collection. Spec > >>> collection class is an Array. > > >> Please post the failing example and the full failure message (i.e. run with --backtrace so we can see the full backtrace). > > >>> Thanks, > >>> ~Larry > > >> _______________________________________________ > >> rspec-users mailing list > >> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > > rspec-users mailing list > > rspec-us... at rubyforge.org > >http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users