Hello, I''m very happy with TDD and use it whereever possible. I came across Rails::Test and hoped to make even better tests easier. My problem is I haven''t been able to run my tests ever since I made those 3 small changes to test_helper.rb :-( At first, I simply tried running rake test:functionals but it just gives me errors like: /Users/gitte/Projects/rtime/config/../app/controllers/ billing_controller.rb:3: undefined method `layout'' for BillingController:Class (NoMethodError) It''s obvious to me what the error is - it''s not obvious why. Have I missed something? My test_helper.rb looks like this: ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/ environment") require ''test/rails'' require ''test_help'' class Test::Rails::TestCase self.use_transactional_fixtures = false self.use_instantiated_fixtures = false # Add more helper methods to be used by all tests here... end Greetings, Gitte Wange --~--~---------~--~----~------------~-------~--~----~ 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, I highly recommend using the following for testing your rails application(s): unit (test models) functional (test controller and model) integration (test across controllers and models) Stub files are automatically generated for both controllers and models. Then you can easily use rake tasks to execute your tests. For example, rake test -> executes unit, functional, and integration rake test:units -> execute unit tests rake test:functionals -> execute functional tests rake test:integration -> execute integration tests Good luck, -Conrad On 11/16/06, Gitte Wange <gitte-vGiBmfdlLJY@public.gmane.org> wrote:> > > Hello, > > I''m very happy with TDD and use it whereever possible. I came across > Rails::Test and hoped to make even better tests easier. > My problem is I haven''t been able to run my tests ever since I made > those 3 small changes to test_helper.rb :-( > > At first, I simply tried running rake test:functionals but it just > gives me errors like: > /Users/gitte/Projects/rtime/config/../app/controllers/ > billing_controller.rb:3: undefined method `layout'' for > BillingController:Class (NoMethodError) > > It''s obvious to me what the error is - it''s not obvious why. Have I > missed something? > > My test_helper.rb looks like this: > ENV["RAILS_ENV"] = "test" > require File.expand_path(File.dirname(__FILE__) + "/../config/ > environment") > require ''test/rails'' > require ''test_help'' > > class Test::Rails::TestCase > self.use_transactional_fixtures = false > self.use_instantiated_fixtures = false > > # Add more helper methods to be used by all tests here... > end > > > > Greetings, > > Gitte Wange > > > >--~--~---------~--~----~------------~-------~--~----~ 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 17/11/2006, at 0.39, Conrad Taylor wrote:> Hi, I highly recommend using the following for testing your rails > application(s): > > unit (test models) > functional (test controller and model) > integration (test across controllers and models)I''ve very familiar witht the stock testing framework in rails - I use it all the time for TDD :-) I came across Test::Rails and wanted to try it out. It has some assertions for ajax stuff and a lot of other nifty things that I would like to benefit from. So I just wanted to know if anyone else had the same kind of problems with the module as I have :-) Greetings, Gitte Wange --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---