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.

This project is archived and is in readonly mode.

assert_select in 2.3.0RC1 again

#2007

Hi,

updating to Rails 2.3 RC1 broke some of my functional tests, which all ran without errors in 2.2.2. Namely, the line


assert_select 'div#flash'

is now supposed to be false, while changing it to


# assert_select 'div#flash'
assert_match '<div class="subcolumns note" id="flash">', @response.body

turns out to be true.

I tried to trace it and found that response_from_page_or_rjs in selector_assertions.rb returns an empty root:


#<HTML::Node:0x3e87274 @position=0, @children=[], @line=0, @parent=nil>

while in 2.2.2 it correctly returned my whole document body as content of root.

I can, of course, simply rewrite my tests, but I was wondering whether this is an expected behavior.

Alex

BTW: Yes, I've seen #1890 Tests which use assert_select fail in 2.3.0 RC1 when upgrading an app and I'm not using ActiveMerhcant. I've temporarily disabled some plugins and updated the rest. Unfortunately with no effect.

Reported by pbuddy · February 18th, 2009 @ 12:21 PM

State: invalid
Milestone: 2.x
Assigned to: CancelProfileIsBroken CancelProfileIsBroken
Importance: none

Activity

  1. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.0, assertions, assert_select, functional to 2.3.0, assertions, assert_select, bugmash, functional

    August 5th, 2009 @ 01:46 PM

  2. Mike Breen
    Mike Breen
    • Assigned user set to CancelProfileIsBroken

    I cannot reproduce this on 2-3-stable

    August 9th, 2009 @ 05:57 PM

  3. Pratik
    Pratik
    • State changed from new to invalid
    • Tag changed from 2.3.0, assertions, assert_select, bugmash, functional to 2.3.0, assertions, assert_select, functional

    August 9th, 2009 @ 05:58 PM