Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capybara 3 normalize whitespace

I've just updated Capybara to version 3.13.

I've noticed that you can add an option to assertions using, normalize_ws: true. For my existing test packs, updating every assertion to use this would be time consuming.

Can this be set in the env.rb file of your cucumber project to be invoked by default?

like image 480
Tom Avatar asked Oct 27 '25 07:10

Tom


1 Answers

You can set Capybara.default_normalize_ws = true, although you should start updating your assertions to match what a user actually sees because the option will probably go away in Capybara 4

like image 72
Thomas Walpole Avatar answered Oct 29 '25 07:10

Thomas Walpole



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!