aboutsummaryrefslogtreecommitdiffstats
path: root/railties/generators/templates
diff options
context:
space:
mode:
Diffstat (limited to 'railties/generators/templates')
-rw-r--r--railties/generators/templates/controller.erb19
-rw-r--r--railties/generators/templates/controller_test.erb17
-rw-r--r--railties/generators/templates/controller_view.rhtml10
-rw-r--r--railties/generators/templates/helper.erb2
-rw-r--r--railties/generators/templates/mailer.erb15
-rw-r--r--railties/generators/templates/mailer_action.rhtml3
-rw-r--r--railties/generators/templates/mailer_fixture.rhtml4
-rw-r--r--railties/generators/templates/mailer_test.erb37
-rw-r--r--railties/generators/templates/model.erb2
-rw-r--r--railties/generators/templates/model_test.erb11
10 files changed, 0 insertions, 120 deletions
diff --git a/railties/generators/templates/controller.erb b/railties/generators/templates/controller.erb
deleted file mode 100644
index 600f5d2c59..0000000000
--- a/railties/generators/templates/controller.erb
+++ /dev/null
@@ -1,19 +0,0 @@
-class <%= class_name %>Controller < AbstractApplicationController
- helper :<%= file_name %>
-<% if options[:scaffold] -%>
- model :<%= file_name %>
- scaffold :<%= options[:scaffold] %>
-
- <%- for action in actions -%>
- #def <%= action %>
- #end
-
- <%- end -%>
-<% else -%>
- <%- for action in actions -%>
- def <%= action %>
- end
-
- <%- end -%>
-<% end -%>
-end
diff --git a/railties/generators/templates/controller_test.erb b/railties/generators/templates/controller_test.erb
deleted file mode 100644
index 5577379c62..0000000000
--- a/railties/generators/templates/controller_test.erb
+++ /dev/null
@@ -1,17 +0,0 @@
-require File.dirname(__FILE__) + '/../test_helper'
-require '<%= file_name %>_controller'
-
-# Re-raise errors caught by the controller.
-class <%= class_name %>Controller; def rescue_action(e) raise e end; end
-
-class <%= class_name %>ControllerTest < Test::Unit::TestCase
- def setup
- @controller = <%= class_name %>Controller.new
- @request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new
- end
-
- # Replace this with your real tests
- def test_truth
- assert true
- end
-end
diff --git a/railties/generators/templates/controller_view.rhtml b/railties/generators/templates/controller_view.rhtml
deleted file mode 100644
index d8a310df50..0000000000
--- a/railties/generators/templates/controller_view.rhtml
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title><%= class_name %>#<%= action %></title>
-</head>
-<body>
-<h1><%= class_name %>#<%= action %></h1>
-<p>Find me in app/views/<%= file_name %>/<%= action %>.rhtml</p>
-</body>
-</html>
diff --git a/railties/generators/templates/helper.erb b/railties/generators/templates/helper.erb
deleted file mode 100644
index 3fe2ecdc74..0000000000
--- a/railties/generators/templates/helper.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-module <%= class_name %>Helper
-end
diff --git a/railties/generators/templates/mailer.erb b/railties/generators/templates/mailer.erb
deleted file mode 100644
index 5afc254923..0000000000
--- a/railties/generators/templates/mailer.erb
+++ /dev/null
@@ -1,15 +0,0 @@
-require 'action_mailer'
-
-class <%= class_name %> < ActionMailer::Base
-
-<% for action in actions -%>
- def <%= action %>(sent_on = Time.now)
- @recipients = ''
- @from = ''
- @subject = ''
- @body = {}
- @sent_on = sent_on
- end
-
-<% end -%>
-end
diff --git a/railties/generators/templates/mailer_action.rhtml b/railties/generators/templates/mailer_action.rhtml
deleted file mode 100644
index b481906829..0000000000
--- a/railties/generators/templates/mailer_action.rhtml
+++ /dev/null
@@ -1,3 +0,0 @@
-<%= class_name %>#<%= action %>
-
-Find me in app/views/<%= file_name %>/<%= action %>.rhtml
diff --git a/railties/generators/templates/mailer_fixture.rhtml b/railties/generators/templates/mailer_fixture.rhtml
deleted file mode 100644
index f315d430ed..0000000000
--- a/railties/generators/templates/mailer_fixture.rhtml
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= class_name %>#<%= action %>
-
-Find me in test/fixtures/<%= file_name %>/<%= action %>.
-I'm tested against the view in app/views/<%= file_name %>/<%= action %>.
diff --git a/railties/generators/templates/mailer_test.erb b/railties/generators/templates/mailer_test.erb
deleted file mode 100644
index f17d614195..0000000000
--- a/railties/generators/templates/mailer_test.erb
+++ /dev/null
@@ -1,37 +0,0 @@
-require File.dirname(__FILE__) + '/../test_helper'
-require '<%= file_name %>'
-
-class <%= class_name %>Test < Test::Unit::TestCase
- FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures'
-
- def setup
- ActionMailer::Base.delivery_method = :test
- ActionMailer::Base.perform_deliveries = true
- ActionMailer::Base.deliveries = []
-
- @expected = TMail::Mail.new
- @expected.to = 'test@localhost'
- @expected.from = 'test@localhost'
- @expected.subject = '<%= class_name %> test mail'
- end
-
-<% for action in actions -%>
- def test_<%= action %>
- @expected.body = read_fixture('<%= action %>')
- @expected.date = Time.now
-
- created = nil
- assert_nothing_raised { created = <%= class_name %>.create_<%= action %>(@expected.date) }
- assert_not_nil created
- assert_equal @expected.encoded, created.encoded
-
- assert_nothing_raised { <%= class_name %>.deliver_<%= action %>(@expected.date) }
- assert_equal @expected.encoded, ActionMailer::Base.deliveries.first.encoded
- end
-
-<% end -%>
- private
- def read_fixture(action)
- IO.readlines("#{FIXTURES_PATH}/<%= file_name %>/#{action}")
- end
-end
diff --git a/railties/generators/templates/model.erb b/railties/generators/templates/model.erb
deleted file mode 100644
index 8d4c89e912..0000000000
--- a/railties/generators/templates/model.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-class <%= class_name %> < ActiveRecord::Base
-end
diff --git a/railties/generators/templates/model_test.erb b/railties/generators/templates/model_test.erb
deleted file mode 100644
index a3ad2b72fb..0000000000
--- a/railties/generators/templates/model_test.erb
+++ /dev/null
@@ -1,11 +0,0 @@
-require File.dirname(__FILE__) + '/../test_helper'
-require '<%= file_name %>'
-
-class <%= class_name %>Test < Test::Unit::TestCase
- fixtures :<%= table_name %>
-
- # Replace this with your real tests
- def test_truth
- assert true
- end
-end \ No newline at end of file