Hi all, Is there a dependency for the RESTful Authentication plugin to make the test cases pass? I get a number of errors on a brand new Rails project with only the RESTful plugin installed. I''ve moved the bits of code around as instructed after running the generator script for the plugin. Here''s an example: 1) Error: test_should_create_user(UserTest): NoMethodError: undefined method `assert_difference'' for #<UserTest: 0x327b73c> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/test_process.rb:452:in `method_missing'' ./test/unit/user_test.rb:7:in `test_should_create_user'' Apparently assert_difference/assert_no_difference is not included in the Rails 1.2.3 framework. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 6/28/07, Robert Walker <rwalker348-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi all, > > Is there a dependency for the RESTful Authentication plugin to make > the test cases pass? I get a number of errors on a brand new Rails > project with only the RESTful plugin installed. I''ve moved the bits > of code around as instructed after running the generator script for > the plugin.It generates an authenticated test helper file that you can include in your unit tests. It should be included for you in the test cases that restful authentication generates: http://svn.techno-weenie.net/projects/plugins/restful_authentication/generators/authenticated/templates/model_functional_test.rb -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thank for you quick reply Rick, however, after further experimentation I still get the same failures when running test. I''ve also searched and dug through all the code I could find and nothing I see implements the assert_difference and assert_no_difference methods. I have included all the relevant test output here: ... robertwalker$ rake test:units ... /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/ rake-0.7.3/lib/rake/rake_test_loader.rb" "test/unit/ user_notifier_test.rb" "test/unit/user_test.rb" Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/ rake_test_loader Started ..E....EEEE... Finished in 0.091025 seconds. 1) Error: test_should_create_user(UserTest): NoMethodError: undefined method `assert_difference'' for #<UserTest: 0x3278424> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/test_process.rb:452:in `method_missing'' ./test/unit/user_test.rb:10:in `test_should_create_user'' 2) Error: test_should_require_email(UserTest): NoMethodError: undefined method `assert_no_difference'' for #<UserTest: 0x327835c> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/test_process.rb:452:in `method_missing'' ./test/unit/user_test.rb:38:in `test_should_require_email'' ... ... 14 tests, 16 assertions, 0 failures, 5 errors On Jun 28, 12:30 pm, "Rick Olson" <technowee...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 6/28/07, Robert Walker <rwalker...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi all, > > > Is there a dependency for the RESTful Authentication plugin to make > > the test cases pass? I get a number of errors on a brand new Rails > > project with only the RESTful plugin installed. I''ve moved the bits > > of code around as instructed after running the generator script for > > the plugin. > > It generates an authenticated test helper file that you can include in > your unit tests. It should be included for you in the test cases that > restful authentication generates: > > http://svn.techno-weenie.net/projects/plugins/restful_authentication/... > > -- > Rick Olsonhttp://lighthouseapp.comhttp://weblog.techno-weenie.nethttp://mephistoblog.com--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 6/28/07, Robert Walker <rwalker348-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Thank for you quick reply Rick, however, after further experimentation > I still get the same failures when running test. I''ve also searched > and dug through all the code I could find and nothing I see implements > the assert_difference and assert_no_difference methods. I have > included all the relevant test output here:Oh, the plugin was updated for edge just a few days ago. You can just use an old revision if you want. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 29, 4:45 am, "Rick Olson" <technowee...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Oh, the plugin was updated for edge just a few days ago. You can just > use an old revision if you want.I keep forgetting that a lot of development is going on against Edge - this problem has tripped me up as well. Please could you recommend a revision to use against 1.2.3 ? Many thanks, Kee --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Oh, the plugin was updated for edge just a few days ago. You can just > use an old revision if you want. >Hello, I''ve encountered the same problem as Robert. Is reverting back to an old revision a short-term solution? And if so, does that mean these two functions will be replaced with something else in the future? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Hello, I''ve encountered the same problem as Robert. Is reverting back > to an old revision a short-term solution? And if so, does that mean > these two functions will be replaced with something else in the > future? Thanks.They''re in edge rails. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 18, 2007, at 6:29 AM, Rick Olson wrote:> >> Hello, I''ve encountered the same problem as Robert. Is reverting back >> to an old revision a short-term solution? And if so, does that mean >> these two functions will be replaced with something else in the >> future? Thanks. > > They''re in edge rails. >I have worked around the problem by picking up the files activesupport/lib/active_support/core_ext/test.rb and activesupport/lib/active_support/core_ext/test/difference.rb from edge rails and placing them in the version 1.2.3 rails that I am using for my apps. Kim -- Kim Shrier - principal, Shrier and Deihl - mailto:kim-7lDDVWa6PKfQT0dZR+AlfA@public.gmane.org Remote Unix Network Admin, Security, Internet Software Development Tinker Internet Services - Superior FreeBSD-based Web Hosting http://www.tinker.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 18, 11:49 am, Kim Shrier <k...-7lDDVWa6PKfQT0dZR+AlfA@public.gmane.org> wrote:> On Jul 18, 2007, at 6:29 AM, Rick Olson wrote: > > > > >> Hello, I''ve encountered the same problem as Robert. Is reverting back > >> to an old revision a short-term solution? And if so, does that mean > >> these two functions will be replaced with something else in the > >> future? Thanks. > > > They''re in edge rails. > > I have worked around the problem by picking up the files > activesupport/lib/active_support/core_ext/test.rb and > activesupport/lib/active_support/core_ext/test/difference.rb > from edge rails and placing them in the version 1.2.3 rails > that I am using for my apps.This workaround worked nicely for me. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---