activerecord-import/test/support/factories.rb

18 lines
380 B
Ruby
Raw Normal View History

Factory.define :group do |m|
m.sequence(:order) { |n| "Order #{n}" }
end
Factory.define :invalid_topic, :class => "Topic" do |m|
m.sequence(:title){ |n| "Title #{n}"}
m.author_name nil
end
Factory.define :topic do |m|
m.sequence(:title){ |n| "Title #{n}"}
m.sequence(:author_name){ |n| "Author #{n}"}
end
Factory.define :widget do |m|
m.sequence(:w_id){ |n| n}
end