aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/lib/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/lib/controller')
-rw-r--r--actionpack/test/lib/controller/fake_models.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb
index 37b200d57a..c4127ee699 100644
--- a/actionpack/test/lib/controller/fake_models.rb
+++ b/actionpack/test/lib/controller/fake_models.rb
@@ -149,3 +149,18 @@ class Author < Comment
attr_accessor :post
def post_attributes=(attributes); end
end
+
+module Blog
+ def self._railtie
+ self
+ end
+
+ class Post < Struct.new(:title, :id)
+ extend ActiveModel::Naming
+ include ActiveModel::Conversion
+
+ def persisted?
+ id.present?
+ end
+ end
+end