Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## gallery_steps.rb
- Given /^there is a (.*?) gallery$/ do |title|
- @gallery = Factory.create(:gallery, :title => title)
- end
- ## factories.rb
- Factory.define :user do |f|
- f.login { Faker::Internet.user_name + rand(5124123).to_s }
- f.name { Faker::Name.name }
- f.email { Faker::Internet.email }
- f.password { "asdfghjkl" }
- f.password_confirmation { "asdfghjkl" }
- end
- Factory.define :gallery do |f|
- f.title Faker::Company.catch_phrase
- f.description Faker::Lorem.paragraph
- f.user Factory(:user)
- end
Add Comment
Please, Sign In to add comment