mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 00:08:50 +01:00
Vendoring Rails 2.3.5
This commit is contained in:
parent
3e83d19299
commit
f8779795ce
943 changed files with 56503 additions and 61351 deletions
|
|
@ -1,6 +1,6 @@
|
|||
require 'abstract_unit'
|
||||
|
||||
ActionController::Helpers::HELPERS_DIR.replace File.dirname(__FILE__) + '/../fixtures/helpers'
|
||||
ActionController::Base.helpers_dir = File.dirname(__FILE__) + '/../fixtures/helpers'
|
||||
|
||||
class TestController < ActionController::Base
|
||||
attr_accessor :delegate_attr
|
||||
|
|
@ -130,6 +130,20 @@ class HelperTest < Test::Unit::TestCase
|
|||
assert methods.include?('foobar')
|
||||
end
|
||||
|
||||
def test_all_helpers_with_alternate_helper_dir
|
||||
@controller_class.helpers_dir = File.dirname(__FILE__) + '/../fixtures/alternate_helpers'
|
||||
|
||||
# Reload helpers
|
||||
@controller_class.master_helper_module = Module.new
|
||||
@controller_class.helper :all
|
||||
|
||||
# helpers/abc_helper.rb should not be included
|
||||
assert !master_helper_methods.include?('bare_a')
|
||||
|
||||
# alternate_helpers/foo_helper.rb
|
||||
assert master_helper_methods.include?('baz')
|
||||
end
|
||||
|
||||
def test_helper_proxy
|
||||
methods = ApplicationController.helpers.methods.map(&:to_s)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue