aboutsummaryrefslogtreecommitdiffstats
path: root/railties/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'railties/helpers')
-rw-r--r--railties/helpers/abstract_application.rb5
-rw-r--r--railties/helpers/application_helper.rb3
-rw-r--r--railties/helpers/test_helper.rb16
3 files changed, 24 insertions, 0 deletions
diff --git a/railties/helpers/abstract_application.rb b/railties/helpers/abstract_application.rb
new file mode 100644
index 0000000000..fa26cd0399
--- /dev/null
+++ b/railties/helpers/abstract_application.rb
@@ -0,0 +1,5 @@
+# The filters added to this controller will be run for all controllers in the application.
+# Likewise will all the methods added be available for all controllers.
+class AbstractApplicationController < ActionController::Base
+ helper :application
+end \ No newline at end of file
diff --git a/railties/helpers/application_helper.rb b/railties/helpers/application_helper.rb
new file mode 100644
index 0000000000..0392b53b46
--- /dev/null
+++ b/railties/helpers/application_helper.rb
@@ -0,0 +1,3 @@
+# The methods added to this helper will be available to all templates in the application.
+module ApplicationHelper
+end
diff --git a/railties/helpers/test_helper.rb b/railties/helpers/test_helper.rb
new file mode 100644
index 0000000000..d348f26517
--- /dev/null
+++ b/railties/helpers/test_helper.rb
@@ -0,0 +1,16 @@
+ENV["RAILS_ENV"] ||= "test"
+require File.dirname(__FILE__) + "/../config/environment"
+
+require 'test/unit'
+require 'active_record/fixtures'
+require 'action_controller/test_process'
+
+# Make rubygems available for testing if possible
+begin require('rubygems'); rescue LoadError; end
+begin require('dev-utils/debug'); rescue LoadError; end
+
+def create_fixtures(*table_names)
+ Fixtures.create_fixtures(File.dirname(__FILE__) + "/fixtures", table_names)
+end
+
+Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/" \ No newline at end of file