Created
December 14, 2019 22:54
-
-
Save brunapereira/dcc9d88fc89976e55372cff79e81a055 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Helpers | |
def enable_toggle(toggle_name) | |
allow_any_instance_of(Flipper).to receive(:enabled?).with(toggle_name).and_return(true) | |
end | |
def disable_toggle(toggle_name) | |
allow_any_instance_of(Flipper).to receive(:enabled?).with(toggle_name).and_return(false) | |
end | |
end | |
RSpec.configure do |config| | |
config.include Helpers | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment