Re: [rspec-users] cucumber and fixtures

2008-10-10 Thread Mark Thomson
Hilarious. This is exactly what I needed today as well and eventually found this thread through Google, not realizing it was already sitting in my inbox. :-). In my case I wanted to use fixtures in testing because the development db had already been populated by a data migration, and I didn't

Re: [rspec-users] cucumber and fixtures

2008-10-09 Thread Daniel Higginbotham
Pat Maddox wrote: > Daniel Higginbotham <[EMAIL PROTECTED]> writes: > >>> ActiveRecord::Schema.verbose = false >>> { :name => "blah", :id => 1 }, >> >> end >> end >> >> Are you similarly able to load your YAML fixtures from spec/fixtures >> when you're running a Cucumber feature? >> >> T

Re: [rspec-users] cucumber and fixtures

2008-10-08 Thread Pat Maddox
Daniel Higginbotham <[EMAIL PROTECTED]> writes: > Zach Dennis wrote: >> I use seed_fu with cucumber. >> >> http://github.com/mbleigh/seed-fu/tree >> >> To load them I use the following my features/steps/env.rb. I reload >> them for every scenarios: >> >> Before do >> >> ActiveRecord::Base.es

Re: [rspec-users] cucumber and fixtures

2008-10-08 Thread Daniel Higginbotham
Zach Dennis wrote: > I use seed_fu with cucumber. > > http://github.com/mbleigh/seed-fu/tree > > To load them I use the following my features/steps/env.rb. I reload > them for every scenarios: > > Before do > > ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test'])

Re: [rspec-users] cucumber and fixtures

2008-10-08 Thread Zach Dennis
I use seed_fu with cucumber. http://github.com/mbleigh/seed-fu/tree To load them I use the following my features/steps/env.rb. I reload them for every scenarios: Before do ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test']) ActiveRecord::Schema.verbose = false

Re: [rspec-users] cucumber and fixtures

2008-10-08 Thread Daniel Higginbotham
aslak hellesoy wrote: > On Wed, Oct 8, 2008 at 3:16 PM, Daniel Higginbotham > <[EMAIL PROTECTED]> wrote: >> Is it possible to use spec fixtures with Cucumber, and if so, how? >> > > Google for cucumber fixtures > > http://www.ruby-forum.com/topic/165215 > http://www.ruby-forum.com/topic/165777 Y

Re: [rspec-users] cucumber and fixtures

2008-10-08 Thread aslak hellesoy
On Wed, Oct 8, 2008 at 3:16 PM, Daniel Higginbotham <[EMAIL PROTECTED]> wrote: > Is it possible to use spec fixtures with Cucumber, and if so, how? > Google for cucumber fixtures http://www.ruby-forum.com/topic/165215 http://www.ruby-forum.com/topic/165777 > Thanks, > Daniel Higginbotham > -- >

[rspec-users] cucumber and fixtures

2008-10-08 Thread Daniel Higginbotham
Is it possible to use spec fixtures with Cucumber, and if so, how? Thanks, Daniel Higginbotham -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Cucumber and fixtures/FixtureReplacement

2008-09-09 Thread Scott Taylor
On Sep 9, 2008, at 2:58 PM, Tim Glen wrote: Did you see that my code uses extend? Yes - tried both in my flailing about :) If that still doesn't work, file a bug report. http://rspec.lighthouseapp.com/projects/16211-cucumber/overview It might be a FixtureReplacement bug, but I'll still loo

Re: [rspec-users] Cucumber and fixtures/FixtureReplacement

2008-09-09 Thread Aslak Hellesøy
Did you see that my code uses extend? Yes - tried both in my flailing about :) If that still doesn't work, file a bug report. http://rspec.lighthouseapp.com/projects/16211-cucumber/overview It might be a FixtureReplacement bug, but I'll still look into it. Could it be that FixtureReplacem

Re: [rspec-users] Cucumber and fixtures/FixtureReplacement

2008-09-09 Thread Tim Glen
Did you see that my code uses extend? Yes - tried both in my flailing about :) If that still doesn't work, file a bug report. http://rspec.lighthouseapp.com/projects/16211-cucumber/overview It might be a FixtureReplacement bug, but I'll still look into it. Could it be that FixtureReplacemen

Re: [rspec-users] Cucumber and fixtures/FixtureReplacement

2008-09-09 Thread Tim Glen
Before do self.extend(FixtureReplacement) end I had previously tried this right in the steps file: Before do self.include(FixtureReplacement) end Actually - this turned out to almost the right thing. I just added this to my env.rb: `include FixtureReplacement` Wrapping it in the Before bl

Re: [rspec-users] Cucumber and fixtures/FixtureReplacement

2008-09-09 Thread aslak hellesoy
On Tue, Sep 9, 2008 at 8:20 PM, Tim Glen <[EMAIL PROTECTED]> wrote: >> On Tue, Sep 9, 2008 at 7:45 PM, Matt Wynne <[EMAIL PROTECTED]> wrote: >>> >>> Remember these things should use transactions, and may do that by default >>> - >>> the database will be wiped clean once the features have run. >>> >

Re: [rspec-users] Cucumber and fixtures/FixtureReplacement

2008-09-09 Thread Tim Glen
On Tue, Sep 9, 2008 at 7:45 PM, Matt Wynne <[EMAIL PROTECTED]> wrote: Remember these things should use transactions, and may do that by default - the database will be wiped clean once the features have run. sorry - I wasn't trying to say that the database is empty after the scenarios are r

Re: [rspec-users] Cucumber and fixtures/FixtureReplacement

2008-09-09 Thread aslak hellesoy
On Tue, Sep 9, 2008 at 7:45 PM, Matt Wynne <[EMAIL PROTECTED]> wrote: > Remember these things should use transactions, and may do that by default - > the database will be wiped clean once the features have run. > FWIW, When Cucumber is used with Rails it runs all scenarios in a transaction. I hav

Re: [rspec-users] Cucumber and fixtures/FixtureReplacement

2008-09-09 Thread Matt Wynne
Remember these things should use transactions, and may do that by default - the database will be wiped clean once the features have run. On 9 Sep 2008, at 18:22, Tim Glen wrote: Hey guys, I'd never used RSpec Stories before, so I decided to follow the apparent direction of the wind and jus

[rspec-users] Cucumber and fixtures/FixtureReplacement

2008-09-09 Thread Tim Glen
Hey guys, I'd never used RSpec Stories before, so I decided to follow the apparent direction of the wind and just jump right into cucumber. I'm dabbling with/using Cucumber and really like it. Good job, aslak! Where i'm struggling right now is using either fixtures or a model factory meth