When strict mode is enabled (:raise or true), calling Flipper.add("feature_name") immediately warns or raises "Could not find feature" before the feature is actually created.
Steps to reproduce
- Set
config.flipper.strict = true (or :raise)
- In an IRB session, call
Flipper.add(:bulk_gift_card_checkout)
- Observe the warning: "Could not find feature... Call
Flipper.add() to create it"
Expected behavior
Flipper.add() should create the feature without triggering strict mode warnings, since that's the method's purpose.
Actual behavior
Strict mode warning/error is raised before the feature is added to the database.
Environment
When strict mode is enabled (
:raiseortrue), callingFlipper.add("feature_name")immediately warns or raises "Could not find feature" before the feature is actually created.Steps to reproduce
config.flipper.strict = true(or:raise)Flipper.add(:bulk_gift_card_checkout)Flipper.add()to create it"Expected behavior
Flipper.add()should create the feature without triggering strict mode warnings, since that's the method's purpose.Actual behavior
Strict mode warning/error is raised before the feature is added to the database.
Environment