Method: Feature.run_with_deactivated

Defined in:
lib/feature/testing.rb

.run_with_deactivated(feature) ⇒ Object

Execute the code block with the given feature deactive

Example usage:

Feature.run_with_deactivated(:feature) do
  # your test code here
end


30
31
32
33
34
35
36
# File 'lib/feature/testing.rb', line 30

def self.run_with_deactivated(feature)
  old_features = @active_features.dup
  @active_features.delete(feature)
  yield
ensure
  @active_features = old_features
end