Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-07 Thread Wolfram Arnold
Yi Wen wrote: > I do this: > > Fixtures.reset_cache > fixtures_folder = File.join(RAILS_ROOT, 'test', 'fixtures') > fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| > File.basename(f, '.yml') } > fixture_class_names = {} # or whatever needed > Fixtures.create_fixtures(fixtures_folder,

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-05 Thread Yi
I do this: Fixtures.reset_cache fixtures_folder = File.join(RAILS_ROOT, 'test', 'fixtures') fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') } fixture_class_names = {} # or whatever needed Fixtures.create_fixtures(fixtures_folder, fixtures, fixture_class_names)

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-05 Thread Wolfram Arnold
This still wasn't fully working; I posted too soon. See here for the final and working version: http://wiki.github.com/aslakhellesoy/cucumber/fixtures -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org htt

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-05 Thread Wolfram Arnold
The method I posted last week only works for Cucumber prior to 0.2.3.2. For 0.2.3.2 and later, you cannot pass a block to the World more than once, and thus the new way would be (in env.rb): module FixtureAccess def self.included(base) (class << base; self; end).class_eval do @@fixt

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-06-02 Thread Wolfram Arnold
I've updated http://wiki.github.com/aslakhellesoy/cucumber/fixtures accordingly. -- 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 vs Rails Fixtures

2009-06-02 Thread Wolfram Arnold
>> How do I actually use real, pre-existing Rails fixtures, the same as >> the unit tests use? For familiarity? What I was missing is the regular use of fixtures as in rspec or test unit, like so: u = users(:bob) u.email = "aaa" u.should_not be_valid This link > > http://wiki.github.com/aslak

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-05-21 Thread Phlip
aslak hellesoy wrote: http://groups.google.com/group/cukes What, no gmane yet?? (-: I would have preferred: "I have set up GMane" Netiquette: I would _not_ set someone else's group up on GMane - even if it were just a Google Group... -- Phlip http://flea.sourceforge.net/resume.htm

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-05-21 Thread aslak hellesoy
> >> Ben Mabey wrote: >> >>> http://wiki.github.com/aslakhellesoy/cucumber/fixtures >> >> Ding! That would have been my next click in my Googling. Let's hope this >> thread pushes that up. >> >> > http://groups.google.com/group/cukes >> >> What, no gmane yet?? (-: >> > I would have preferred: "I ha

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-05-21 Thread Aslak Hellesøy
Ben Mabey wrote: http://wiki.github.com/aslakhellesoy/cucumber/fixtures Ding! That would have been my next click in my Googling. Let's hope this thread pushes that up. > http://groups.google.com/group/cukes What, no gmane yet?? (-: I would have preferred: "I have set up GMane" Thank

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-05-20 Thread Phlip
Ben Mabey wrote: http://wiki.github.com/aslakhellesoy/cucumber/fixtures Ding! That would have been my next click in my Googling. Let's hope this thread pushes that up. > http://groups.google.com/group/cukes What, no gmane yet?? (-: -- Phlip _

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-05-20 Thread Ben Mabey
Phlip wrote: Cucumberists: FYI, Cucumber now has it's own mailing list: http://groups.google.com/group/cukes Apologies for not jumping into some wild alternate fixture (or mock!) system, but the unit tests at my new day gig are >cough< hanging by a thread as it is. I need to show off som

[rspec-users] Cucumber vs Rails Fixtures

2009-05-20 Thread Phlip
Cucumberists: Apologies for not jumping into some wild alternate fixture (or mock!) system, but the unit tests at my new day gig are >cough< hanging by a thread as it is. I need to show off some cute Cuke, _without_ rocking the boat! How do I actually use real, pre-existing Rails fixtures, th