aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/assertions/routing.rb
Commit message (Collapse)AuthorAgeFilesLines
* fix with_routing when testing api only controllersJulia López2016-12-291-2/+5
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-3/+3
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Allow specifying encoding of parameters by actionKerri Miller2016-08-091-1/+1
| | | | | At GitHub we need to handle parameter encodings that are not UTF-8. This patch allows us to specify encodings per parameter per action.
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-1/+1
|
* modernizes hash syntax in actionpackXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in actionpack/libXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Change 'a HTTP' to 'an HTTP' [ci skip]Santosh Wadghule2016-03-031-1/+1
|
* Duplicate assert_generates options before modifying itPierre Schambacher2016-02-011-0/+1
|
* Fix double word 'string' [ci skip]Jake Worth2015-11-011-1/+1
|
* Improved readability of Assertion docs, replaced ‘Assert’ -> ↵amitkumarsuroliya2015-10-091-4/+4
| | | | | ‘Asserts’ at all places [ci skip] Following commit https://github.com/rails/docrails/commit/495722a95687e25114ae75608dd3107ac5d6611b
* Rename `extra_keys` variables to `query_string_keys`eileencodes2015-08-081-2/+2
| | | | | | `extra_keys` is a confusing variable name because it's not clear what is "extra". This renames it to `query_string_keys` so it's clear that the "extra" is just the query string.
* Oops! :bomb:Akira Matsuda2015-07-171-1/+1
|
* "warning: instance variable @routes not initialized"Akira Matsuda2015-07-171-1/+1
|
* add a new constructor for allocating test requestsAaron Patterson2015-07-081-1/+1
|
* pass the starting env and session to build_requestAaron Patterson2015-07-081-1/+1
|
* let the superclass build the request and responseAaron Patterson2015-07-081-1/+1
| | | | | We should leverage the request / response objects that the superclass has already allocated for us.
* 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)>