It is a matter of operator precedence. `do end` has lesser precedence and thus the code expect(page).to have_selector("input") do ... end is actually evaluated like expect(page).to(have_selector("input")) do ... end Meaning the block is an argument to the `to` method. Looking into rspec source code, the block is later discarded. So the value was never actually checked. The :css selector has been modified to allow usage of `value` in the `have_selector` helper, which fixes the issue.pull/11649/head
parent
ae6ed59f27
commit
6d657f794d
Loading…
Reference in new issue