From a150689be9281f3a814cd5bdedd42f80f431fe41 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 19 Oct 2009 00:07:37 +0000 Subject: Improved Project#copy to copy more data from the source Project. #3367 * Versions * Associate the copied issues with the new versions * Wiki * WikiPages * WikiContents * IssueCategories git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2934 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/exemplars/user_exemplar.rb | 2 +- test/exemplars/version_exemplar.rb | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test/exemplars/version_exemplar.rb (limited to 'test/exemplars') diff --git a/test/exemplars/user_exemplar.rb b/test/exemplars/user_exemplar.rb index d88f5fe7d..154b16d8f 100644 --- a/test/exemplars/user_exemplar.rb +++ b/test/exemplars/user_exemplar.rb @@ -1,4 +1,4 @@ -class User < ActiveRecord::Base +class User < Principal generator_for :login, :method => :next_email generator_for :mail, :method => :next_email generator_for :firstname, :method => :next_firstname diff --git a/test/exemplars/version_exemplar.rb b/test/exemplars/version_exemplar.rb new file mode 100644 index 000000000..8aef99f4b --- /dev/null +++ b/test/exemplars/version_exemplar.rb @@ -0,0 +1,10 @@ +class Version < ActiveRecord::Base + generator_for :name, :method => :next_name + + def self.next_name + @last_name ||= 'Version 1.0.0' + @last_name.succ! + @last_name + end + +end -- cgit v1.2.3