This project is archived and is in readonly mode.
assert_select_rjs has bad message when assert show/hide fails
Reported by Tim Haines | August 29th, 2008 @ 01:06 AM | in 2.x
In test/spec: response.should have_rjs(:hide, 'subscribe')
When error in controller: page.hide 'subscribe_opps_typo_here'
The error message returned my assert_select_rjs is: "No RJS statement that replaces or inserts HTML content."
This is a poor error message as it leads you to think no rjs statement was returned at all, when in fact an rjs statement was returned, it simply doesn't match the assertion.
A better message would be "No RJS statement for hiding 'subscribe'"
Comments and changes to this ticket
-
Tim Haines August 29th, 2008 @ 11:20 AM
- Tag changed from 2.1, actionpack, assertions, edge to 2.1, actionpack, assertions, edge, patch, tested, tests
Patch attached. Also improved error messages for :toggle and :remove.
Quite simple.
-
Repository August 29th, 2008 @ 07:53 PM
- State changed from new to committed
(from [d0b949d87375ae351757adffd192d8cb1f3dbf8d]) Improve assert_select_rjs failure messages for show, hide, toggle, and remove
Signed-off-by: Michael Koziarski michael@koziarski.com [#931 state:committed] http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 931 assert_select_rjs has bad message when assert show/hide fails Signed-off-by: Michael Koziarski michael@koziarski.com [#...