1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Correct RSpec/Capybara/SpecificMatcher

```
spec/selector_spec.rb:120:27: C: RSpec/Capybara/SpecificMatcher: Prefer have_no_field over have_no_css.
        expect(string).to have_no_css('input[type="hidden"]')
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
This commit is contained in:
ydah 2022-09-23 07:28:36 +09:00
parent 0ec9b138c4
commit 6171a8dbfb

View file

@ -117,7 +117,7 @@ RSpec.describe Capybara do
css { |_sel| 'input[type="hidden"]' }
end
expect(string).to have_no_css('input[type="hidden"]')
expect(string).to have_no_field('this is hidden')
expect(string).to have_selector(:hidden_field)
end
end