Skip to content
Browse files

[#3015] Updated exemplars

  • Loading branch information...
1 parent 81ed7ed commit 9a00e307e44df1e6298318e8bba1397e6892740f @edavis10 committed Sep 12, 2009
Showing with 15 additions and 3 deletions.
  1. +2 −0 test/exemplars/member_exemplar.rb
  2. +5 −3 test/exemplars/project_exemplar.rb
  3. +8 −0 test/exemplars/role_exemplar.rb
View
2 test/exemplars/member_exemplar.rb
@@ -0,0 +1,2 @@
+class Member < ActiveRecord::Base
+end
View
8 test/exemplars/project_exemplar.rb
@@ -1,15 +1,17 @@
class Project < ActiveRecord::Base
generator_for :name, :method => :next_name
- generator_for :identifier, :method => :next_identifier
+ generator_for :identifier, :method => :next_identifier_from_object_daddy
def self.next_name
@last_name ||= 'Project 0'
@last_name.succ!
@last_name
end
-
- def self.next_identifier
+
+ # Project#next_identifier is defined on Redmine
+ def self.next_identifier_from_object_daddy
@last_identifier ||= 'project0'
@last_identifier.succ!
+ @last_identifier
end
end
View
8 test/exemplars/role_exemplar.rb
@@ -0,0 +1,8 @@
+class Role < ActiveRecord::Base
+ generator_for :name, :method => :next_name
+
+ def self.next_name
+ @last_name ||= 'Role0'
+ @last_name.succ!
+ end
+end

0 comments on commit 9a00e30

Please sign in to comment.
Something went wrong with that request. Please try again.