rosa-build/spec/factories/_sequences.rb

32 lines
961 B
Ruby
Raw Normal View History

FactoryGirl.define do
sequence :integer do |n|
n
end
2011-03-17 14:03:02 +00:00
sequence :string do |n|
"Lorem ipsum #{n}"
end
2011-03-17 14:03:02 +00:00
sequence :uname do |n|
"test#{n}"
end
2011-11-22 19:21:09 +00:00
sequence :unixname do |n|
"test_unixname#{n}"
end
2011-11-22 19:21:09 +00:00
sequence :email do |n|
"email#{n}@example.com"
end
2011-03-17 14:03:02 +00:00
sequence :text do |n|
"#{n}. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
end
2011-03-17 14:03:02 +00:00
sequence :text_file do |n|
stringio = StringIO.new("this is file content #{n}")
stringio.instance_eval("def original_filename; 'stringio#{n}.txt'; end ")
stringio
end
2012-01-30 20:39:34 +00:00
end