diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-03 14:11:34 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-03 14:40:06 -0700 |
commit | 18a7b767e8ad545702c1025fc9cc7a1cc3c64f28 (patch) | |
tree | c80347ab3dd3f17d992ce4404df84e242a597eeb /actionpack/test | |
parent | adfd43a4daf08cc9a801a0b6a039dd109ce4e81f (diff) | |
download | rails-18a7b767e8ad545702c1025fc9cc7a1cc3c64f28.tar.gz rails-18a7b767e8ad545702c1025fc9cc7a1cc3c64f28.tar.bz2 rails-18a7b767e8ad545702c1025fc9cc7a1cc3c64f28.zip |
moving fake model to the correct file
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/record_identifier_test.rb | 13 | ||||
-rw-r--r-- | actionpack/test/lib/controller/fake_models.rb | 14 |
2 files changed, 14 insertions, 13 deletions
diff --git a/actionpack/test/controller/record_identifier_test.rb b/actionpack/test/controller/record_identifier_test.rb index e46e317e31..f3e5ff8a47 100644 --- a/actionpack/test/controller/record_identifier_test.rb +++ b/actionpack/test/controller/record_identifier_test.rb @@ -1,19 +1,6 @@ require 'abstract_unit' require 'controller/fake_models' -class Sheep - extend ActiveModel::Naming - include ActiveModel::Conversion - - attr_reader :id - def to_key; id ? [id] : nil end - def save; @id = 1 end - def new_record?; @id.nil? end - def name - @id.nil? ? 'new sheep' : "sheep ##{@id}" - end -end - class RecordIdentifierTest < Test::Unit::TestCase include ActionController::RecordIdentifier diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb index 8cb3b4940a..cf3f2f7fa4 100644 --- a/actionpack/test/lib/controller/fake_models.rb +++ b/actionpack/test/lib/controller/fake_models.rb @@ -130,6 +130,20 @@ class CommentRelevance end end +class Sheep + extend ActiveModel::Naming + include ActiveModel::Conversion + + attr_reader :id + def to_key; id ? [id] : nil end + def save; @id = 1 end + def new_record?; @id.nil? end + def name + @id.nil? ? 'new sheep' : "sheep ##{@id}" + end +end + + class TagRelevance extend ActiveModel::Naming include ActiveModel::Conversion |