aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/prototype_helper_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-04-03 10:56:15 -0700
committerXavier Noria <fxn@hashref.com>2010-04-03 10:56:15 -0700
commit11161e6c96fb6686a33e05ead106b96089ff9790 (patch)
tree35d5618f1a866ce8ba11efd8e6851d2fd7bbf5fc /actionpack/test/template/prototype_helper_test.rb
parent4996d1a445acd965d0064500ad00d692a742f669 (diff)
parent467d251c3dcbd3e4dd1e785a21d63535b795a64c (diff)
downloadrails-11161e6c96fb6686a33e05ead106b96089ff9790.tar.gz
rails-11161e6c96fb6686a33e05ead106b96089ff9790.tar.bz2
rails-11161e6c96fb6686a33e05ead106b96089ff9790.zip
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/template/prototype_helper_test.rb')
-rw-r--r--actionpack/test/template/prototype_helper_test.rb25
1 files changed, 12 insertions, 13 deletions
diff --git a/actionpack/test/template/prototype_helper_test.rb b/actionpack/test/template/prototype_helper_test.rb
index 619293dc43..0ff37f44c2 100644
--- a/actionpack/test/template/prototype_helper_test.rb
+++ b/actionpack/test/template/prototype_helper_test.rb
@@ -47,19 +47,18 @@ class PrototypeHelperBaseTest < ActionView::TestCase
def setup
super
@template = self
- @controller = Class.new do
- def url_for(options)
- if options.is_a?(String)
- options
- else
- url = "http://www.example.com/"
- url << options[:action].to_s if options and options[:action]
- url << "?a=#{options[:a]}" if options && options[:a]
- url << "&b=#{options[:b]}" if options && options[:a] && options[:b]
- url
- end
- end
- end.new
+ end
+
+ def url_for(options)
+ if options.is_a?(String)
+ options
+ else
+ url = "http://www.example.com/"
+ url << options[:action].to_s if options and options[:action]
+ url << "?a=#{options[:a]}" if options && options[:a]
+ url << "&b=#{options[:b]}" if options && options[:a] && options[:b]
+ url
+ end
end
protected