Case insensitive Rspec match

后端 未结 6 668
温柔的废话
温柔的废话 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:15

    How about downcasing both ends of the assertion?

    "ALL CAPS".downcase.should include('All Caps'.downcase)
    

提交回复
热议问题