This project is archived and is in readonly mode.
Assert_Select problem with * selector
-
Frederick Cheung
- State changed from new to invalid
That is normal: when given a block assert_select tries to match the element specified (in this case div#cart) and then yields the matches. so you should be doing
assert_select("div#cart") do |elements| elements.each {|element| assert_select("*",0)} endYour code on the other hand asserts that div#cart exists and then asserts that there are no elements at the top level rather than asserting that there are no elements that are children of the match.
-
diabolo
Ah that explains it - many thanks and apologies for submitting an invalid bug