[rspec-users] fixtures in stories

Chris Parsons chris at edendevelopment.co.uk
Tue Jan 15 10:07:16 EST 2008


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



More information about the rspec-users mailing list