diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-07-17 10:04:52 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-07-17 10:04:52 -0700 |
commit | a9765c54ea17153a69932730e1f5291c1f0055b0 (patch) | |
tree | 182c72ced6eef4febe600e00e057ad0009bd72d2 /actionpack/test | |
parent | 246f07c7512eca59fb304162b1b1d7dea5eb6e64 (diff) | |
download | rails-a9765c54ea17153a69932730e1f5291c1f0055b0.tar.gz rails-a9765c54ea17153a69932730e1f5291c1f0055b0.tar.bz2 rails-a9765c54ea17153a69932730e1f5291c1f0055b0.zip |
helper methods are public, so we can just call them
also if you want a path from a named helper, you should call
helper_path, not helper_url(:only_path => true).
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/url_for_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/controller/url_for_test.rb b/actionpack/test/controller/url_for_test.rb index 7210c68e73..9f086af664 100644 --- a/actionpack/test/controller/url_for_test.rb +++ b/actionpack/test/controller/url_for_test.rb @@ -287,12 +287,12 @@ module AbstractController # We need to create a new class in order to install the new named route. kls = Class.new { include set.url_helpers } controller = kls.new - assert controller.respond_to?(:home_url) + assert_respond_to controller, :home_url assert_equal '/brave/new/world', - controller.send(:url_for, :controller => 'brave', :action => 'new', :id => 'world', :only_path => true) + controller.url_for(:controller => 'brave', :action => 'new', :id => 'world', :only_path => true) - assert_equal("/home/sweet/home/alabama", controller.send(:home_url, :user => 'alabama', :host => 'unused', :only_path => true)) - assert_equal("/home/sweet/home/alabama", controller.send(:home_path, 'alabama')) + assert_equal("/home/sweet/home/alabama", controller.home_path(:user => 'alabama', :host => 'unused', :only_path => true)) + assert_equal("/home/sweet/home/alabama", controller.home_path('alabama')) end end |