diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-05-30 23:15:49 -0400 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-05-30 23:15:49 -0400 |
commit | 1fe7399fa9506d47c532e4023628ce81d6ddfa79 (patch) | |
tree | b5d5e73674c054751bd1da68c437f694f9221ecf /actionpack/test | |
parent | d92a0d040d68038f111adf64446c8d0abf949729 (diff) | |
download | rails-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')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 18 | ||||
-rw-r--r-- | actionpack/test/controller/redirect_test.rb | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index fcbbfe8a18..618df930c9 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -256,24 +256,6 @@ end class ::ApplicationController < ActionController::Base end -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 - module ActionDispatch class DebugExceptions private 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 |