Hello, I searched unit test for Rails on internet, but all the results are for testing Rails APPLICATION generated by Rails. But I think Rails itself needs unit test, too. I need to make sure that all APIs/methods of Rails work fine in different scenarios. I didn''t see any unit test files in the Rails package. Does anyone know how to unit test Rails itself? Thanks a lot. --~--~---------~--~----~------------~-------~--~----~ 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 20 Mar 2008, at 10:21, liuxlsh wrote:> > Hello, > > I searched unit test for Rails on internet, but all the results are > for testing Rails APPLICATION generated by Rails. > > But I think Rails itself needs unit test, too. I need to make sure > that all APIs/methods of Rails work fine in different scenarios. > > I didn''t see any unit test files in the Rails package. Does anyone > know how to unit test Rails itself? >I don''t know where you''ve got your rails from but each of the rails bits has a test folder with a bunch of unit tests. Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
My rails is version 1.2.6. There does be a "test" directory, but all subdirectories in it are empty. On Mar 20, 6:22 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 20 Mar 2008, at 10:21, liuxlsh wrote: > > > > > Hello, > > > I searched unit test for Rails on internet, but all the results are > > for testing Rails APPLICATION generated by Rails. > > > But I think Rails itself needs unit test, too. I need to make sure > > that all APIs/methods of Rails work fine in different scenarios. > > > I didn''t see any unit test files in the Rails package. Does anyone > > know how to unit test Rails itself? > > I don''t know where you''ve got your rails from but each of the rails > bits has a test folder with a bunch of unit tests. > > Fred--~--~---------~--~----~------------~-------~--~----~ 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 20 Mar 2008, at 10:31, liuxlsh wrote:> > My rails is version 1.2.6. There does be a "test" directory, but all > subdirectories in it are empty. >Which directory exactly are you talking about? Rails has always had pretty good test coverage. Fred> On Mar 20, 6:22 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On 20 Mar 2008, at 10:21, liuxlsh wrote: >> >> >> >>> Hello, >> >>> I searched unit test for Rails on internet, but all the results are >>> for testing Rails APPLICATION generated by Rails. >> >>> But I think Rails itself needs unit test, too. I need to make sure >>> that all APIs/methods of Rails work fine in different scenarios. >> >>> I didn''t see any unit test files in the Rails package. Does anyone >>> know how to unit test Rails itself? >> >> I don''t know where you''ve got your rails from but each of the rails >> bits has a test folder with a bunch of unit tests. >> >> Fred > >--~--~---------~--~----~------------~-------~--~----~ 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 3/20/08, liuxlsh <liuxlsh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > My rails is version 1.2.6. There does be a "test" directory, but all > subdirectories in it are empty.If you have frozen rails in your project then the many rails tests will be distributed in various directories like vendor rails actionmailer test actionpack test activerecord test ... And actionpack (which contains ActionController and ActionView) and activerecord also have readme files called RUNNING_UNIT_TESTS with instructions on how to run those tests. If you are using rails from gems they will be in the individual gems. But normally you don''t run these tests in projects, they are really for testing when rails itself is modified/patched, and the tests are run by patch developers and the rails committers before changes are accepted. Bear in mind that some of the rails tests require their own databases to be set up, which is covered in those RUNNING_UNIT_TESTS readmes. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.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 -~----------~----~----~----~------~----~------~--~---
Hi Rick, Thank you very much for your reply. So do you mean that I just need not to test Rails itself, but the prerequisites of Rails, like active*, if the Rails package I got is a frozen version? Or need I get a develop trunk of Rails to get the unit test files? Thanks a lot. On Mar 20, 7:30 pm, "Rick DeNatale" <rick.denat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 3/20/08, liuxlsh <liux...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > My rails is version 1.2.6. There does be a "test" directory, but all > > subdirectories in it are empty. > > If you have frozen rails in your project then the many rails tests > will be distributed in various directories like > > vendor > rails > actionmailer > test > actionpack > test > activerecord > test > ... > > And actionpack (which contains ActionController and ActionView) and > activerecord also have readme files called RUNNING_UNIT_TESTS with > instructions on how to run those tests. > > If you are using rails from gems they will be in the individual gems. > > But normally you don''t run these tests in projects, they are really > for testing when rails itself is modified/patched, and the tests are > run by patch developers and the rails committers before changes are > accepted. > > Bear in mind that some of the rails tests require their own databases > to be set up, which is covered in those RUNNING_UNIT_TESTS readmes. > > -- > Rick DeNatale > > Myblog on Rubyhttp://talklikeaduck.denhaven2.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 -~----------~----~----~----~------~----~------~--~---