mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Swapped parameters of assert_equal in assert_select
This commit is contained in:
parent
9d44b3f886
commit
0ebae1dbc5
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
* Swapped the parameters of assert_equal in `assert_select` so that the
|
||||
proper values were printed correctly
|
||||
|
||||
Fixes #14422.
|
||||
|
||||
*Vishal Lal*
|
||||
|
||||
* The method `shallow?` returns false if the parent resource is a singleton so
|
||||
we need to check if we're not inside a nested scope before copying the :path
|
||||
and :as options to their shallow equivalents.
|
||||
|
|
|
@ -291,7 +291,7 @@ module ActionDispatch
|
|||
# so is this custom message really needed?
|
||||
message = message || %(Expected #{count_description(min, max, count)} matching "#{selector.to_s}", found #{matches.size}.)
|
||||
if count
|
||||
assert_equal matches.size, count, message
|
||||
assert_equal count, matches.size, message
|
||||
else
|
||||
assert_operator matches.size, :>=, min, message if min
|
||||
assert_operator matches.size, :<=, max, message if max
|
||||
|
|
Loading…
Reference in a new issue