Hi everyone, This may not be an issue, but I''m just checking. When I generate a scaffold in rails 2.1, all of the tests that get generated have a require ''test_helper'' at the top. When you try to run a test individually through command line, you get an error: $ ruby test/functional/foos_controller_test.rb test/functional/foos_controller_test.rb:1:in `require'': no such file to load -- ../test_helper (LoadError) Obviously changing this to require File.dirname(__FILE__) + "../test_helper" fixes the problem, however is there a rake task that lets you run tasks individually or is this just a bug? Sorry if I''m being nit-picky, but I like generators and think they should be kept up to date. :) TIA, -Lance --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sorry, require File.dirname(__FILE__) + "/../test_helper" I didn''t test my test ;) On Tue, Jun 24, 2008 at 2:35 AM, Lance Carlson <lancecarlson@gmail.com> wrote:> Hi everyone, > > This may not be an issue, but I''m just checking. When I generate a > scaffold in rails 2.1, all of the tests that get generated have a > require ''test_helper'' at the top. When you try to run a test > individually through command line, you get an error: > > $ ruby test/functional/foos_controller_test.rb > test/functional/foos_controller_test.rb:1:in `require'': no such file > to load -- ../test_helper (LoadError) > > Obviously changing this to require File.dirname(__FILE__) + > "../test_helper" fixes the problem, however is there a rake task that > lets you run tasks individually or is this just a bug? > > Sorry if I''m being nit-picky, but I like generators and think they > should be kept up to date. :) > > TIA, > -Lance >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Lance -- On 24-Jun-08, at 2:35 AM, Lance Carlson wrote:> This may not be an issue, but I''m just checking. When I generate a > scaffold in rails 2.1, all of the tests that get generated have a > require ''test_helper'' at the top. When you try to run a test > individually through command line, you get an error: > > $ ruby test/functional/foos_controller_test.rb > test/functional/foos_controller_test.rb:1:in `require'': no such file > to load -- ../test_helper (LoadError)You can use the -I option to include the test dir in the load path when running from the command line: $ ruby -Itest test/functional/foos_controller_test.rb /Jeff --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ah OK. Thanks Jeff. Sorry for the false alarm. On Tue, Jun 24, 2008 at 2:55 AM, Jeffrey Hardy <packagethief@gmail.com> wrote:> > Hi Lance -- > > On 24-Jun-08, at 2:35 AM, Lance Carlson wrote: >> This may not be an issue, but I''m just checking. When I generate a >> scaffold in rails 2.1, all of the tests that get generated have a >> require ''test_helper'' at the top. When you try to run a test >> individually through command line, you get an error: >> >> $ ruby test/functional/foos_controller_test.rb >> test/functional/foos_controller_test.rb:1:in `require'': no such file >> to load -- ../test_helper (LoadError) > > You can use the -I option to include the test dir in the load path > when running from the command line: > > $ ruby -Itest test/functional/foos_controller_test.rb > > > /Jeff > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Tue, Jun 24, 2008 at 2:35 AM, Lance Carlson <lancecarlson@gmail.com> wrote:> > Hi everyone, > > This may not be an issue, but I''m just checking. When I generate a > scaffold in rails 2.1, all of the tests that get generated have a > require ''test_helper'' at the top. When you try to run a test > individually through command line, you get an error: > > $ ruby test/functional/foos_controller_test.rb > test/functional/foos_controller_test.rb:1:in `require'': no such file > to load -- ../test_helper (LoadError) > > Obviously changing this to require File.dirname(__FILE__) + > "../test_helper" fixes the problem, however is there a rake task that > lets you run tasks individually or is this just a bug? > > Sorry if I''m being nit-picky, but I like generators and think they > should be kept up to date. :) > > TIA, > -Lance >This sounds like a bug - many users will try to run the test directly either within textmate or their ide, or just by doing ''ruby foo_test.rb''. Using the relative path is the right way to go... - Rob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
У Аўт, 24/06/2008 у 09:40 -0400, Rob Sanheim піша:> This sounds like a bug - many users will try to run the test directly > either within textmate or their ide, or just by doing ''ruby > foo_test.rb''. Using the relative path is the right way to go...+1 -- Aliaksey Kandratsenka <alkondratenko@gmail.com> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
It''s being discussed here: http://github.com/rails/rails/commit/e8170805 -- Raul Murciano - Freelance Web Developer http://raul.murciano.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Tue, Jun 24, 2008 at 9:59 AM, Raul Murciano <raul@murciano.net> wrote:> > It''s being discussed here: http://github.com/rails/rails/commit/e8170805 >Great, only three places to check for core discussion now! Lighthouse, github, and here. ;) - Rob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Tue, Jun 24, 2008 at 7:21 AM, Rob Sanheim <rsanheim@gmail.com> wrote:> Great, only three places to check for core discussion now! > Lighthouse, github, and here. ;)Well, a ticket system and a mailing list are pretty traditional for Open Source projects. But using your SCM as a messaging platform? Come on, that''s taking the social networking thing too far... I pray that I never see the official Twitter channel for an open source project I care about, because I ain''t going there... -- Chad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---