1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

19 commits

Author SHA1 Message Date
Rafael Mendonça França
c92ea62792 Make sure assert_recognizes can still find routes mounted after engines
Before, if the application defined after an engine this method would not
recognize the route since it was not defined insdie the engine.
2018-02-09 13:51:20 -05:00
Ryuta Kamizono
165d5b601d Fix merge conflict and rubocop offences 2017-11-07 07:35:54 +09:00
Rafael Mendonça França
256a44c439
Merge pull request #22435 from yui-knk/fix_engine_route_test
Make `assert_recognizes` to traverse mounted engines
2017-11-06 17:24:44 -05:00
Koichi ITO
7c260ae201 Fix RuboCop offenses
And enable `context_dependent` of Style/BracesAroundHashParameters cop.
2017-08-16 17:55:25 +09:00
Kir Shatrov
dfcc766163 Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Rafael Mendonça França
55f9b8129a
Add three new rubocop rules
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces

Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Xavier Noria
b326e82dc0 applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
Xavier Noria
411ccbdab2 remove redundant curlies from hash arguments 2016-08-06 19:44:11 +02:00
Xavier Noria
5b6eb1d58b modernizes hash syntax in actionpack 2016-08-06 19:35:13 +02:00
Xavier Noria
35b3de8021 applies new string literal convention in actionpack/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:54:50 +02:00
yui-knk
b50e88ebdf Make assert_recognizes to traverse mounted engines
Before this commit paths of mounted engines are not traversed
when `assert_recognizes` is called, causing strange test results.
This commit enable to traverse mounted paths.
2016-04-23 11:40:50 +09:00
Rafael Mendonça França
67117f7c5d Add test to assert_recognizes with custom message 2014-09-05 16:47:00 -03:00
Earl St Sauver
31c3eec05d Propagate test messages through assert_routing helper, Fixes #14908
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
2014-04-29 18:34:56 -07:00
David Chelimsky
dcce01132d Raise Assertion instead of RoutingError for routing assertion failures.
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
2012-05-20 06:21:32 -05:00
Andrew White
9b4514c3b8 Copy literal route constraints to defaults - fixes #3571 and #6224. 2012-05-11 07:29:17 +01:00
Matt Fawcett
d7bf930df5 Fix the assert_recognizes test method so that it works when there are
constraints on the querystring. Issue #2781
2012-02-24 13:16:31 +00:00
Andrew White
385be358cf Fix assert_recognizes with block constraints [#5805 state:resolved] 2011-02-13 23:24:46 +00:00