diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-07 12:17:17 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-07 12:17:17 +0000 |
commit | 1e4a936bd08f330062fedf2a32110f23ade0a322 (patch) | |
tree | 78081ac9ea84df25952dd23073486cb82877e929 /actionpack/test/template | |
parent | 8e4edec877342c7436c0a2ee2167ed98a7360254 (diff) | |
download | rails-1e4a936bd08f330062fedf2a32110f23ade0a322.tar.gz rails-1e4a936bd08f330062fedf2a32110f23ade0a322.tar.bz2 rails-1e4a936bd08f330062fedf2a32110f23ade0a322.zip |
Trick tests on url_for
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@66 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/active_record_helper_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb index 68344e1222..12ab78796b 100644 --- a/actionpack/test/template/active_record_helper_test.rb +++ b/actionpack/test/template/active_record_helper_test.rb @@ -3,6 +3,7 @@ require File.dirname(__FILE__) + '/../../lib/action_view/helpers/date_helper' require File.dirname(__FILE__) + '/../../lib/action_view/helpers/form_helper' require File.dirname(__FILE__) + '/../../lib/action_view/helpers/text_helper' require File.dirname(__FILE__) + '/../../lib/action_view/helpers/tag_helper' +require File.dirname(__FILE__) + '/../../lib/action_view/helpers/url_helper' # require File.dirname(__FILE__) + '/../../lib/action_view/helpers/active_record_helper' class ActiveRecordHelperTest < Test::Unit::TestCase @@ -10,6 +11,7 @@ class ActiveRecordHelperTest < Test::Unit::TestCase include ActionView::Helpers::ActiveRecordHelper include ActionView::Helpers::TextHelper include ActionView::Helpers::TagHelper + include ActionView::Helpers::UrlHelper Post = Struct.new("Post", :title, :author_name, :body, :secret, :written_on) Column = Struct.new("Column", :type, :name, :human_name) @@ -38,6 +40,13 @@ class ActiveRecordHelperTest < Test::Unit::TestCase @post.body = "Back to the hill and over it again!" @post.secret = 1 @post.written_on = Date.new(2004, 6, 15) + + @controller = Class.new do + def url_for(options, *parameters_for_method_reference) + options[:action] + end + end + @controller = @controller.new end def test_generic_input_tag |