Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

This project is archived and is in readonly mode.

assert_select_rjs has bad message when assert show/hide fails

#931

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'"

Reported by Tim Haines · August 29th, 2008 @ 01:06 AM

State: committed
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Tim Haines
    Tim Haines
    • 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.

    August 29th, 2008 @ 11:20 AM

  2. Repository
    Repository
    • 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 assert_select_rjs has bad message when assert show/hide fails state:committed] http://github.com/rails/rails/co...

    August 29th, 2008 @ 07:53 PM