aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-03-02 06:56:40 -0800
committerJosé Valim <jose.valim@gmail.com>2012-03-02 06:56:40 -0800
commit1a046ab9bf7f0c3fa045a2b771a5a22d318f02ff (patch)
treef3694b72ccc15888a9c32910b1dc92a42a6f762e /actionpack/test/template
parentaeeebe1fdca56d20a9950f5585d10f8089388278 (diff)
parentcd5dabab95924dfaf3af8c429454f1a46d9665c1 (diff)
downloadrails-1a046ab9bf7f0c3fa045a2b771a5a22d318f02ff.tar.gz
rails-1a046ab9bf7f0c3fa045a2b771a5a22d318f02ff.tar.bz2
rails-1a046ab9bf7f0c3fa045a2b771a5a22d318f02ff.zip
Merge pull request #5242 from rails/opt_routes
Optimize routes generation in simple cases. If you pass to the route helper the same amount of arguments as the required segments, route generation will be optimized as a string interpolation. After this commit, `post_path(post)` is about 6.5 times faster, `post_url(post)` is about 5 times.
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/sprockets_helper_with_routes_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/template/sprockets_helper_with_routes_test.rb b/actionpack/test/template/sprockets_helper_with_routes_test.rb
index bcbd81a7dd..89b9940eb7 100644
--- a/actionpack/test/template/sprockets_helper_with_routes_test.rb
+++ b/actionpack/test/template/sprockets_helper_with_routes_test.rb
@@ -17,7 +17,7 @@ class SprocketsHelperWithRoutesTest < ActionView::TestCase
def setup
super
- @controller = BasicController.new
+ @controller = BasicController.new
@assets = Sprockets::Environment.new
@assets.append_path(FIXTURES.join("sprockets/app/javascripts"))
@@ -34,7 +34,7 @@ class SprocketsHelperWithRoutesTest < ActionView::TestCase
test "namespace conflicts on a named route called asset_path" do
# Testing this for sanity - asset_path is now a named route!
- assert_match asset_path('test_asset'), '/assets/test_asset'
+ assert_equal asset_path('test_asset'), '/assets/test_asset'
assert_match %r{/assets/logo-[0-9a-f]+.png},
path_to_asset("logo.png")