Case insensitive Rspec match

后端 未结 6 672
温柔的废话
温柔的废话 2021-02-12 10:00

I\'m writing a Capybara test and using Rspec for the assertions. My test is failing because there is a CSS style being applied that is causing the text to be in all caps. How ca

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-12 10:30

    I only run into this issue when:

    • Using poltergeist driver. (I don't know if this also happens with other drivers)

    • Inspecting page, not page.body for expectations: expect(page).to ...

    So, If I do expect(page.body).to ... it just works and solved the issue.

提交回复
热议问题