Skip to content

Assert absence does not work properly on selectors containing '?' #9

@khustochka

Description

@khustochka

I have added the following assertion:

assert_nothing_raised { assert_select "a[href='http://example.org?query=value']", false }

It raises exception:

Expected at least 1 element matching "a[href='http://example.orgfalsequery=value']", found 0..
Expected 0 to be >= 1.

As you can see the problem is that ? is substituted by false, and assertion checks for presence, not absence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions