I''m running the tests with latest edge rails and this one is failing: -- test_any_should_not_load_results(NamedScopeTest) [./test/cases/../../lib/active_record/test_case.rb:40:in `assert_queries'' ./test/cases/named_scope_test.rb:189:in `test_any_should_not_load_results'' ./test/cases/../../lib/../../activesupport/lib/active_support/ testing/setup_and_teardown.rb:94:in `__send__'' ./test/cases/../../lib/../../activesupport/lib/active_support/ testing/setup_and_teardown.rb:94:in `run'']: 0 instead of 1 queries were executed. <1> expected but was <0>. -- Is anyone else getting this? It was added a week ago with this commit: http://github.com/rails/rails/commit/93e10f9911fb2a096681ee0a0bc82487a9a06c44 The test itself doesn''t make much sense to me. No queries should be running because the "empty?" method is stubbed out so a Count query never gets called. It seems the test itself is wrong, not the code. UPDATE: I just updated mocha and now this test is passing. I''m assuming this has to do with how "expects" gets passed to proxy_scope and ends up loading the results performing in the 1 query. I''m posting this anyway because I think this test should be fixed so it doesn''t rely on the version of mocha installed. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2008-Aug-02 08:37 UTC
Re: Failing Test: test_any_should_not_load_results
> UPDATE: I just updated mocha and now this test is passing. I''m > assuming this has to do with how "expects" gets passed to proxy_scope > and ends up loading the results performing in the 1 query. I''m posting > this anyway because I think this test should be fixed so it doesn''t > rely on the version of mocha installed.Either that, or we should simply up the minimum version we support in the uses_mocha code. Either approach seems fine to me. Good hunting, do you want to do the honours? :) -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I''d prefer to change the test itself since others are having this problem as well (see comment in the github commit). I''ll work on submitting a patch to lighthouse. Regards, Ryan On Aug 2, 1:37 am, "Michael Koziarski" <mich...@koziarski.com> wrote:> > UPDATE: I just updated mocha and now this test is passing. I''m > > assuming this has to do with how "expects" gets passed to proxy_scope > > and ends up loading the results performing in the 1 query. I''m posting > > this anyway because I think this test should be fixed so it doesn''t > > rely on the version of mocha installed. > > Either that, or we should simply up the minimum version we support in > the uses_mocha code. Either approach seems fine to me. > > Good hunting, do you want to do the honours? :) > > -- > Cheers > > Koz--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Here''s the ticket with patch: http://rails.lighthouseapp.com/projects/8994/tickets/782 Regards, Ryan On Aug 7, 7:16 pm, Ryan Bates <r...@railscasts.com> wrote:> I''d prefer to change the test itself since others are having this > problem as well (see comment in the github commit). I''ll work on > submitting a patch to lighthouse. > > Regards, > > Ryan > > On Aug 2, 1:37 am, "Michael Koziarski" <mich...@koziarski.com> wrote: > > > > UPDATE: I just updated mocha and now this test is passing. I''m > > > assuming this has to do with how "expects" gets passed to proxy_scope > > > and ends up loading the results performing in the 1 query. I''m posting > > > this anyway because I think this test should be fixed so it doesn''t > > > rely on the version of mocha installed. > > > Either that, or we should simply up the minimum version we support in > > the uses_mocha code. Either approach seems fine to me. > > > Good hunting, do you want to do the honours? :) > > > -- > > Cheers > > > Koz--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2008-Aug-08 08:36 UTC
Re: Failing Test: test_any_should_not_load_results
Cheers, applied! On Fri, Aug 8, 2008 at 4:44 AM, Ryan Bates <ryan@railscasts.com> wrote:> > Here''s the ticket with patch: > http://rails.lighthouseapp.com/projects/8994/tickets/782 > > Regards, > > Ryan > > On Aug 7, 7:16 pm, Ryan Bates <r...@railscasts.com> wrote: >> I''d prefer to change the test itself since others are having this >> problem as well (see comment in the github commit). I''ll work on >> submitting a patch to lighthouse. >> >> Regards, >> >> Ryan >> >> On Aug 2, 1:37 am, "Michael Koziarski" <mich...@koziarski.com> wrote: >> >> > > UPDATE: I just updated mocha and now this test is passing. I''m >> > > assuming this has to do with how "expects" gets passed to proxy_scope >> > > and ends up loading the results performing in the 1 query. I''m posting >> > > this anyway because I think this test should be fixed so it doesn''t >> > > rely on the version of mocha installed. >> >> > Either that, or we should simply up the minimum version we support in >> > the uses_mocha code. Either approach seems fine to me. >> >> > Good hunting, do you want to do the honours? :) >> >> > -- >> > Cheers >> >> > Koz > > >-- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---