Re: [rspec-users] Loading (or stubbing) data before model loading

2009-07-22 Thread David Chelimsky
On Wed, Jul 22, 2009 at 8:27 AM, Tom Stuart wrote: > On 22 Jul 2009, at 13:57, David Chelimsky wrote: >>> >>> The problem is that RSpec starts with an empty test database >> >> Not exactly. RSpec starts with whatever database you have and rolls >> back to that state after each example provided you'

Re: [rspec-users] Loading (or stubbing) data before model loading

2009-07-22 Thread Tom Stuart
On 22 Jul 2009, at 13:57, David Chelimsky wrote: The problem is that RSpec starts with an empty test database Not exactly. RSpec starts with whatever database you have and rolls back to that state after each example provided you're only using before(:each) to set up state before each example.

Re: [rspec-users] Loading (or stubbing) data before model loading

2009-07-22 Thread David Chelimsky
On Tue, Jul 21, 2009 at 2:58 PM, Tom Stuart wrote: > Hi, > > A Rails project I'm working on has, for better or worse, some data-driven > structure in its models: a few model classes need certain values (e.g. some > enumerations) to be available in the database at load time in order for > certain bi

Re: [rspec-users] Loading (or stubbing) data before model loading

2009-07-22 Thread Matt Wynne
On 21 Jul 2009, at 20:58, Tom Stuart wrote: Hi, A Rails project I'm working on has, for better or worse, some data- driven structure in its models: a few model classes need certain values (e.g. some enumerations) to be available in the database at load time in order for certain bits of me

[rspec-users] Loading (or stubbing) data before model loading

2009-07-21 Thread Tom Stuart
Hi, A Rails project I'm working on has, for better or worse, some data- driven structure in its models: a few model classes need certain values (e.g. some enumerations) to be available in the database at load time in order for certain bits of metaprogramming to kick off correctly. It would