OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/test/exemplars/cost_object_exemplar.rb

15 lines
381 B

CostObject.class_eval do
generator_for :subject, "Cost Subject"
generator_for :project, :method => :next_project
generator_for :author, :method => :next_author
generator_for :description, "Some cost subject"
generator_for :fixed_date, Date.today
def self.next_project
Project.last.id || Project.generate!.id
end
def self.next_author
User.first
end
end