aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/test/controller/fake_models.rb5
-rw-r--r--actionpack/test/controller/new_render_test.rb7
-rw-r--r--actionpack/test/controller/render_test.rb5
3 files changed, 7 insertions, 10 deletions
diff --git a/actionpack/test/controller/fake_models.rb b/actionpack/test/controller/fake_models.rb
new file mode 100644
index 0000000000..2761b09f2f
--- /dev/null
+++ b/actionpack/test/controller/fake_models.rb
@@ -0,0 +1,5 @@
+class Customer < Struct.new(:name, :id)
+ def to_param
+ id.to_s
+ end
+end
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index 4f2b062fa2..b1069ca820 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -1,10 +1,5 @@
require File.dirname(__FILE__) + '/../abstract_unit'
-
-class Customer < Struct.new(:name, :id)
- def to_param
- id.to_s
- end
-end
+require File.dirname(__FILE__) + '/fake_models'
class CustomersController < ActionController::Base
end
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index 553022e3d9..c856fcf19b 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -1,8 +1,5 @@
require File.dirname(__FILE__) + '/../abstract_unit'
-
-unless defined?(Customer)
- Customer = Struct.new("Customer", :name)
-end
+require File.dirname(__FILE__) + '/fake_models'
module Fun
class GamesController < ActionController::Base