Skip to content

Delegate at runtime in `test` per default

Compare
Choose a tag to compare
@sascha-wolf sascha-wolf released this 13 Nov 20:20

This release extends the delegate_at option to allow passing a list of environments similar to check_if_exists.

To be more clear on the intent delegate_at has been renamed to delegate_at_runtime? and check_if_exists to check_if_exists?. The old names are still accepted by Knigge but a deprecation warning is printed if they are being used.

With this done the default of delegate_at_runtime? has been set to [only: :test] which allowed to change the default of check_if_exists? to true.

Now Knigge will no longer generate compiler warnings in test when using Mox.defmock since the implementation will - as the this change suggests - be loaded at runtime instead of compile time.