This project is archived and is in readonly mode.

#931 ✓committed
Tim Haines

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

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

Referenced by

Pages