aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/mount_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Rails-ish apps should descend from Rails::RailtieAaron Patterson2014-07-161-4/+10
| | | | | Use an is_a check to ensure it's a Railsish app so we can avoid respond_to calls everywhere.
* always test against a routed rack app so there are always url_helpersAaron Patterson2014-07-071-1/+2
|
* Fix request's path_info when a rack app mounted at '/'.Larry Lv2014-06-141-0/+7
| | | | Fixes issue #15511.
* Revert "Don't remove trailing slash from PATH_INFO for mounted apps"Piotr Sarnacki2014-01-161-5/+0
| | | | | | | The revert is needed because of a regression described in #13369, routes with trailing slash are no longer recognized properly. This reverts commit 50311f1391ddd8e0349d74eb57f04b7e0045a27d.
* Fix mounting engines inside a resources blockPiotr Sarnacki2013-12-101-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | When a route is mounted inside a resources block, it's automatically prefixed, so a following code: resources :users do mount Blog::Engine => '/blog' end will generate a user_blog path helper. In order to access engine helpers, we also use "mounted_helpers", a list of helpers associated with each mounted engine, so a path to blog's post can be generated using user_blog.post_path(user, post). The problem I'm fixing here is that mount used a raw :as option, without taking nestings into account. As a result, blog was added to a route set as a `user_blog`, but helper was generated for just `blog`. This commit applies the proper logic for defining a helper for a mounted engine nested in resources or resource block. (closes #8533)
* Don't remove trailing slash from PATH_INFO for mounted appsPiotr Sarnacki2013-06-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Previously when app was mounted as following: class Foo def call(env) [200, {}, [env['PATH_INFO']]] end end RackMountRailsBug::Application.routes.draw do mount RackTest.new => "/foo" end trailing slash was removed from PATH_INFO. For example requesting GET /foo/bar/ on routes defined above would result in a response containing "/foo/bar" instead of "/foo/bar/". This commit fixes the issue. (closes #3215)
* Update tests for #9704, named route collisionsJeremy Kemper2013-03-241-1/+1
| | | | | * Fix named route collision in mount test fixture * Update controller named route precedence test
* Make sure :via works with mountPratik Naik2012-08-201-0/+9
|
* Add passing tests for generating URLs with nested SCRIPT_NAMEsJeremy Kemper2012-05-071-0/+5
|
* adding tests for #4029Aaron Patterson2011-12-191-1/+1
|
* Check if the routes object really responds to define_mount_prefix.José Valim2010-12-091-0/+18
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* Make all AP tests pass for Ruby 1.9.1.José Valim2010-03-121-4/+4
|
* Add support for mount RackApp, :at => "/sprockets" with a shorthand of mount ↵Carlhuda2010-03-081-0/+36
Sprockets => "/sprockets". This is different from the match syntax in that it cannot be used for controller/action and it does not assume an anchor at the end of the match. For instance, in the above example, if the client asked for "/sprockets/foo.js", the Sprockets app would have a SCRIPT_NAME of "/sprockets" and PATH_INFO of "/foo.js".