Skip to content

Instantly share code, notes, and snippets.

@brunapereira
Last active December 14, 2019 22:56
Show Gist options
  • Save brunapereira/e2994c880fc04f0c773ae8d8a65af848 to your computer and use it in GitHub Desktop.
Save brunapereira/e2994c880fc04f0c773ae8d8a65af848 to your computer and use it in GitHub Desktop.
require 'rails_helper'
require 'webmock/rspec'
describe ::Toggle::TestToggle do
context 'When test_toggle feature toggle is active' do
it 'returns enabled' do
enable_toggle(:test_feature)
expect(described_class.new.show).to eql('Enabled!')
end
end
context 'When test_toggle feature toggle is inactive' do
it 'returns disabled' do
disable_toggle(:test_feature)
expect(described_class.new.show).to eql('Disabled!')
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment