diff options
Diffstat (limited to 'test/exemplars/board_exemplar.rb')
-rw-r--r-- | test/exemplars/board_exemplar.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/exemplars/board_exemplar.rb b/test/exemplars/board_exemplar.rb new file mode 100644 index 000000000..264ea8107 --- /dev/null +++ b/test/exemplars/board_exemplar.rb @@ -0,0 +1,21 @@ +class Board < ActiveRecord::Base + generator_for :name, :method => :next_name + generator_for :description, :method => :next_description + generator_for :project, :method => :generate_project + + def self.next_name + @last_name ||= 'A Forum' + @last_name.succ! + @last_name + end + + def self.next_description + @last_description ||= 'Some description here' + @last_description.succ! + @last_description + end + + def self.generate_project + Project.generate! + end +end |