Skip to content

Commit

Permalink
🤞 Fix brittle test
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Jan 8, 2024
1 parent 903b9a5 commit 05e2ce0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test_rails/system/test_help_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ class TestApp < Rails::Application

class FeaturesController < ActionController::Base
def index
render inline: Flipper.enabled?(:test) ? "Enabled" : "Disabled"
render json: Flipper.enabled?(:test) ? "Enabled" : "Disabled"
end
end

class TestHelpTest < ActionDispatch::SystemTestCase
# Any driver that runs the app in a separate thread will test what we want here.
driven_by :cuprite

# Ensure this test uses this app instance
setup { Rails.application = TestApp.instance }

test "configures a shared adapter between tests and app" do
Flipper.disable(:test)
visit "/"
Expand Down

0 comments on commit 05e2ce0

Please sign in to comment.