Jon Leighton wrote:
> On Sep 7, 10:53 pm, Josh Susser <[EMAIL PROTECTED]> wrote:
>> On Sep 7, 2008, at 5:58 AM, Jon Leighton wrote:
>> If you run the whole test suite via rake test_mysql, it happens  
>> automatically using a dirty trick.  If you want to do it manually, you  
>> need to run the file aaa_create_tables_test.rb - the 'aaa' forces the  
>> file to run before all the other tests, ensuring the schema is loaded.
> 
> Thanks.
> 
> I will certainly create a doc patch for RUNNING_UNIT_TESTS, but what
> do people thing about doing away with the aaa_create_table_test.rb
> file? Instead we could check for the existence of one of the table we
> need in helper.rb, and if it's not there we could load the schema.
> This would enable the schema to be autoloaded even when running single
> test files.

If you can figure out a nice solution that supports this that would be
fantastic.  The only catch I can see to the test helper approach is that
you could be repeatedly testing for the existence or otherwise of those
tables.  It's hardly likely to be a performance issue, but it's a little
messy all the same.  If you need any help tidying this up, just let us know.


-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to