Hey folks. I was looking for the mailing list archive up on rspec.info. I clicked on the "community" link and received the URL "http://ey01-s00414/community/". This isn''t correct, obviously. The hint shows it as, "http://rspec.info/community". Where is the mailing list archive? How far back does it go? I''d really like to read back through it and research my own problems as much as possible. With Regards, // Signed // Cody P. Skidmore
On Jan 15, 2008 8:27 AM, Cody P. Skidmore <cody at skidmore.us> wrote:> Hey folks. I was looking for the mailing list archive up on rspec.info. > I clicked on the "community" link and received the URL > "http://ey01-s00414/community/". This isn''t correct, obviously. The hint > shows it as, "http://rspec.info/community".Try http://rspec.info/community/ (with a trailing slash). I''ll work to get that resolved.> > Where is the mailing list archive?http://rubyforge.org/pipermail/rspec-devel/ http://rubyforge.org/pipermail/rspec-users/ Cheers, David> How far back does it go? I''d really > like to read back through it and research my own problems as much as > possible. > > With Regards, > > // Signed // > > Cody P. Skidmore > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Hi all, how/where do I load fixtures in stories? Ingo
Hi Ingo, On 15 Jan 2008, at 14:55, Ingo Weiss wrote:> how/where do I load fixtures in stories?Try loading your data up manually using ''Given'' blocks: (my_story.txt) Given a user called Bob And a user called Charlie and: (steps.rb) Given "a user called $name" do |name| User.create! :name => name end Hope this helps Chris
Thanks, Chris! This is how I create most of my data for stories. However, I have one case (globalize languages/countries) where loading the data from fixtures seems to make more sense. Also, I would like to load them in one place, globally for all stories, as you can do in spec_helper, in order to not have to include a ''Given language ...'' in all of my stories. Is that possible? Ingo On Jan 15, 2008, at 4:07 PM, Chris Parsons wrote:> Hi Ingo, > > On 15 Jan 2008, at 14:55, Ingo Weiss wrote: > >> how/where do I load fixtures in stories? > > Try loading your data up manually using ''Given'' blocks: > > (my_story.txt) > Given a user called Bob > And a user called Charlie > > and: > > (steps.rb) > Given "a user called $name" do |name| > User.create! :name => name > end > > Hope this helps > Chris > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
If you do a self.class.fixtures :all (or whatever name) in the given block, then you can read from fixtures, but you won''t be able to do users(:tester), you''ll have to do a User.find JD On Jan 15, 2008, at 7:23 AM, Ingo Weiss wrote:> Thanks, Chris! > > This is how I create most of my data for stories. However, I have one > case (globalize languages/countries) where loading the data from > fixtures seems to make more sense. Also, I would like to load them in > one place, globally for all stories, as you can do in spec_helper, in > order to not have to include a ''Given language ...'' in all of my > stories. Is that possible? > > Ingo > > > On Jan 15, 2008, at 4:07 PM, Chris Parsons wrote: > >> Hi Ingo, >> >> On 15 Jan 2008, at 14:55, Ingo Weiss wrote: >> >>> how/where do I load fixtures in stories? >> >> Try loading your data up manually using ''Given'' blocks: >> >> (my_story.txt) >> Given a user called Bob >> And a user called Charlie >> >> and: >> >> (steps.rb) >> Given "a user called $name" do |name| >> User.create! :name => name >> end >> >> Hope this helps >> Chris >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users