Skip to main content

One post tagged with "Ruby"

View All Tags

Tweaking Cucumber Ruby's Auto-Loader for Version 4

Luke Hill
Maintainer of Cucumber-Ruby

TL;DR: Since v1, Cucumber-Ruby has used Ruby's load to auto-load support and step definition files. This can result in surprising behaviour where files you've already loaded are asked to be loaded a second time by Cucumber. As of v4, users will get the option to specify whether Cucumber should use require or load by setting the top-level configuration option Cucumber.use_legacy_autoloader. If unset or set to false, then Cucumber uses the require keyword. If set to true, then Cucumber uses the load keyword, which reloads the files. This is a breaking change; hence releasing it in v4.