Hey,
I am working on an application and I started using feature toggles recently. I'm not sure how to test my code (both unit and integration/service test) for all the states of the toggle.<p>For unit tests I duplicated my test cases and patched the feature toggle checker to return either true or false (depending on the test case). The plan is to remove the test cases for the "off" toggle case when I remove the code. The downside of this approach is that number of test cases grows exponentially with the number of toggles we use.<p>For integration/acceptance tests I plan to build a framework to somehow enable/disable the toggle for a user (maybe using an HTTP header to override the toggle value).<p>Are you using any other approaches?