aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/journey
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate `JSON.{parse,load,generate,dump}` and `def to_json`Godfrey Chan2013-11-051-2/+2
| | | | | | | | | | | | | | | JSON.{dump,generate} offered by the JSON gem is not compatiable with Rails at the moment and can cause a lot of subtle bugs when passed certain data structures. This changed all direct usage of the JSON gem in internal Rails code to always go through AS::JSON.{decode,encode}. We also shouldn't be implementing `to_json` most of the time, and these occurances are replaced with an equivilent `as_json` implementation to avoid problems down the road. See [1] for all the juicy details. [1]: intridea/multi_json#138 (comment)
* Correct error in Utils.normalize_path that changed paths improperlyJosh Symonds2013-10-231-0/+8
|
* Skip Rack applications and redirects when generating urlsAndrew White2013-07-161-9/+13
| | | | | | | | | | When generating an unnamed url (i.e. using `url_for` with an options hash) we should skip anything other than standard Rails routes otherwise it will match the first mounted application or redirect and generate a url with query parameters rather than raising an error if the options hash doesn't match any defined routes. Fixes #8018
* Make ActionDispatch::Journey::Path::Pattern#new raise more meaningful ↵zires2013-02-271-0/+4
| | | | exception message.
* Change the behavior of route defaultsAndrew White2013-01-151-5/+8
| | | | | | | | | | | | | | | | | | | This commit changes route defaults so that explicit defaults are no longer required where the key is not part of the path. For example: resources :posts, bucket_type: 'posts' will be required whenever constructing the url from a hash such as a functional test or using url_for directly. However using the explicit form alters the behavior so it's not required: resources :projects, defaults: { bucket_type: 'projects' } This changes existing behavior slightly in that any routes which only differ in their defaults will match the first route rather than the closest match. Closes #8814
* Raise correct exception now Journey is integrated.Andrew White2013-01-151-4/+4
| | | | | | | Now that Journey has been integrated into ActionDispatch we can raise the exception ActionController::UrlGenerationError directly rather than raising the internal Journey::Router::RoutingError and then have ActionDispatch::Routing::RouteSet#generate re-raise the exception.
* Use ActiveSupport::TestCase in the journey testsRafael Mendonça França2012-12-3113-13/+13
|
* Alias refute methods to assert_not and perfer assert_not on testsRafael Mendonça França2012-12-317-17/+17
|
* Integrate Journey into Action DispatchAndrew White2012-12-1913-0/+1615
Move the Journey code underneath the ActionDispatch namespace so that we don't pollute the global namespace with names that may be used for models. Fixes rails/journey#49.