aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-05-30 23:15:49 -0400
committerJon Moss <me@jonathanmoss.me>2016-05-30 23:15:49 -0400
commit1fe7399fa9506d47c532e4023628ce81d6ddfa79 (patch)
treeb5d5e73674c054751bd1da68c437f694f9221ecf /actionpack/test/controller
parentd92a0d040d68038f111adf64446c8d0abf949729 (diff)
downloadrails-1fe7399fa9506d47c532e4023628ce81d6ddfa79.tar.gz
rails-1fe7399fa9506d47c532e4023628ce81d6ddfa79.tar.bz2
rails-1fe7399fa9506d47c532e4023628ce81d6ddfa79.zip
Move `Workshop` class definition
We should define it only where we need it, not in the global abstract unit :grimacing:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/redirect_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb
index f83248402c..4af3c628d0 100644
--- a/actionpack/test/controller/redirect_test.rb
+++ b/actionpack/test/controller/redirect_test.rb
@@ -1,5 +1,23 @@
require 'abstract_unit'
+class Workshop
+ extend ActiveModel::Naming
+ include ActiveModel::Conversion
+ attr_accessor :id
+
+ def initialize(id)
+ @id = id
+ end
+
+ def persisted?
+ id.present?
+ end
+
+ def to_s
+ id.to_s
+ end
+end
+
class RedirectController < ActionController::Base
# empty method not used anywhere to ensure methods like
# `status` and `location` aren't called on `redirect_to` calls