Skip to content

How to handle strict adapter with test? #806

@sethhorsley

Description

@sethhorsley

this is related to: #763

What is the expected way to handle the strict adapter in tests?

Should I add all the flipper features in a fixture or in an initializer file?

It mentions this in the docs:

Adding feature flags to your app is as simple as adding conditionals
...

<% if Flipper.enabled? :new_feature, current_user %>
 <%= link_to "New Feature", new_feature_path %>
<% end %>

https://www.flippercloud.io/docs/guides/launch#add-feature-flags-to-your-app

It makes it seem like just adding the conditionals like Flipper.enabled? :new_feature is all you need to add a flipper feature, but in tests this warns:

Could not find feature "deep_search". Call `Flipper.add("deep_search")` to create it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions