aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/assertions/routing.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18665 from sgrif/sg-test-route-allSean Griffin2015-02-201-8/+14
|\ | | | | Allow `method: "all"` as a valid routing test option
| * Allow `method: "all"` as a valid routing test optionSean Griffin2015-01-231-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the test to mirror the production code, since `via: :all` is a valid option. The behavior in 4.1 did not actually test that it matched all verbs, but instead defaulted to testing for "GET". This implementation aims to better handle the intention of passing "all". What will actually be asserted doesn't quite match up with the generated route, since it appears to just not create a constraint on the method. However, I don't think that we can easily test the lack of that constraint. Testing each of the main 4 HTTP verbs seems to be a reasonably close approximation, which should be sufficient for our needs. Fixes #18511.
* | Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846robertomiranda2015-01-311-1/+1
|/ | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
* Remove outdated comments [ci skip]Godfrey Chan2014-11-221-6/+0
| | | They were introduced in 23b6def; the serial stuff has been removed since a5d80f8
* :scissors:Rafael Mendonça França2014-09-051-1/+1
|
* Message doesn't need to be optionalRafael Mendonça França2014-09-051-2/+2
|
* Merge pull request #14911 from estsauver/14908Rafael Mendonça França2014-09-051-7/+7
|\ | | | | | | Propagate test messages through assert_routing helper, Fixes #14908
| * Propagate test messages through assert_routing helper, Fixes #14908Earl St Sauver2014-04-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assert_routing was not raising the message passed into the assertion violation that it raised. This change propagates messages through the on_fail error. This fixes this error: https://github.com/rails/rails/issues/14908 A test case for this issue is located here. https://github.com/estsauver/test14908 To see that test case fail in the example app, just run ruby -Itest test/controllers/guests_controller_test.rb
* | ask the named routes collection if the route is definedAaron Patterson2014-07-291-1/+1
|/ | | | | we should not be accessing internals to figure out if a method is defined.
* Change all `MiniTest` to `Minitest` since, `MiniTest` namespace has been ↵Vipul A M2013-12-181-1/+1
| | | | | | renamed to `Minitest` Ref: https://github.com/seattlerb/minitest/blob/master/History.txt
* Mark unused variables and make some style fixesAgis Anastasopoulos2013-04-081-2/+2
| | | | It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused.
* Missing requiresAkira Matsuda2013-01-061-0/+1
|
* Remove unnecessary begin..rescue..end, use only rescueAkira Matsuda2013-01-061-5/+3
|
* Removed extra call to #diff in #assert_recognizes. assert_equal calls it for ↵Ryan Davis2012-11-171-4/+7
| | | | you and shows the diff. Also delayed message calculation so the cost of the diff on success is now gone.
* Deprecate Hash#diff.Steve Klabnik2012-11-091-3/+1
| | | | | | It's no longer used in Rails any more. See https://github.com/rails/rails/pull/8142\#issuecomment-10227297 for more
* 1.9 hash syntax changes to docsAvnerCohen2012-10-311-15/+15
|
* Updated with_routing example to 3.x syntax [ci skip]Wojciech Wnętrzak2012-07-131-7/+4
|
* Raise Assertion instead of RoutingError for routing assertion failures.David Chelimsky2012-05-201-7/+13
| | | | | | | | | | | | | Before this change, assert_recognizes, assert_generates, and assert_routing raised ActionController::RoutingError when they failed to recognize the route. This commit changes them to raise Assertion instead. This aligns with convention for logical failures, and supports reporting tools that care about the difference between logical failures and errors e.g. the summary at the end of a test run. - Fixes #5899
* Removing ==Examples and last blank lines of docs from actionpackFrancesco Rodriguez2012-05-151-3/+0
|
* Fix the assert_recognizes test method so that it works when there areMatt Fawcett2012-02-241-4/+3
| | | | constraints on the querystring. Issue #2781
* use sprintf rather than build_messageAaron Patterson2012-01-061-4/+6
|
* TODO fix explicitly loading exceptations, autoload removedVishnu Atrai2011-07-111-0/+1
|
* Remove extra white spaces on ActionPack docs.Sebastian Martinez2011-05-231-9/+9
|
* use assert_equal so we get normal error messages along with our custom ↵Aaron Patterson2011-03-301-3/+3
| | | | failure message
* Remove incorrect assert_recognizes exampleAndrew White2011-02-131-3/+0
|
* Fix assert_recognizes with block constraints [#5805 state:resolved]Andrew White2011-02-131-1/+2
|
* _routes must be inside @controller conditional.Emilio Tagua2010-09-271-1/+1
|
* Refactor method to avoid warnings and not run unnecessary code.Emilio Tagua2010-09-271-11/+11
|
* Ask is @controller is defined to avoid warning.Emilio Tagua2010-09-271-1/+1
|
* escape constants that should not be linked toJoost Baaij2010-08-271-2/+2
|
* Support routing constraints in functional testsAndrew White2010-08-201-14/+37
| | | | | | | | | | Extend assert_recognizes and assert_generates to support passing full urls as the path argument. This allows testing of routing constraints such as subdomain and host within functional tests. [#5005 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Remove unused variable on assert_recognizes [#4912 state:resolved]Paco Guzman2010-06-221-1/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Some require indifferent_access addedSantiago Pastorino2010-04-211-0/+1
| | | | Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
* Consistent routing languageJoshua Peek2010-03-301-10/+10
|
* Fix stack overflow bug in integration test router helpersJoshua Peek2010-03-301-1/+1
|
* Each controller class has it's own view context subclass. This removes the ↵Carlhuda2010-03-181-3/+4
| | | | need for ActionView::Base.for_controller
* All tests pass without memoizing view_contextCarlhuda2010-03-181-3/+2
|
* Do not always include the named URL helpers into AC::Base and AV::Base.Carl Lerche2010-03-161-2/+16
|
* Remind us that RoutingAssertions should work in an integration contextYehuda Katz2010-02-261-0/+1
|
* Setting UrlFor in with_routing is no longer needed now that it's not globalCarlhuda2010-02-261-3/+0
|
* Rename named_url_helpers to url_helpers and url_helpers to url_forCarlhuda2010-02-261-3/+3
|
* Rename metaclass to singleton_classCarlhuda2010-02-251-1/+1
|
* Final pass at removing the router from a global constantCarlhuda2010-02-251-1/+1
|
* WIP: Remove the global routerCarlhuda2010-02-251-14/+13
|
* Use ActionDispatch::Routing everywhereMartin Schürrer2010-02-211-11/+11
|
* Merge docrailsPratik Naik2010-01-171-8/+8
|
* Move route reloading into railtiesJoshua Peek2009-12-141-2/+0
|
* TestProcess belongs in ADJoshua Peek2009-12-121-0/+40
|
* Kill RouteSet#recognizeJoshua Peek2009-12-101-2/+4
|
* Depend on Hash#diff extensionJeremy Kemper2009-05-301-0/+2
|