Skip to content

README cleanup; drop unused RSpecSupport module#4

Merged
Fivell merged 2 commits into
mainfrom
readme-cleanup
Jun 1, 2026
Merged

README cleanup; drop unused RSpecSupport module#4
Fivell merged 2 commits into
mainfrom
readme-cleanup

Conversation

@Fivell
Copy link
Copy Markdown
Member

@Fivell Fivell commented Jun 1, 2026

Summary

  • Drop the mixed-mode block from setup docs (devise :database_authenticatable, :rememberable, :omniauthable). The gem is positioned as OIDC-only and mounts session routes unconditionally — there is no value in pairing it with :database_authenticatable.
  • Drop the ActiveAdmin::Oidc::RSpecSupport module entirely. No host app uses it: known consumers either inlined the equivalent four lines of RSpec.configure directly or never integrated TestHelpers at all. The CI_RUN_OIDC env filter + automatic :omniauthable skip logic was carrying its weight for a use case nobody has.
  • Add ## Testing section documenting ActiveAdmin::Oidc::TestHelpers (stub_oidc_sign_in / stub_oidc_failure / reset_oidc_stubs) with the direct RSpec setup snippet.
  • Minor accuracy fixes: scope helpers are derived from config.admin_user_class (not hardcoded :admin_user); engine-mounted Devise hosts need router_name: on both Devise.router_name = … and devise_for; the custom-login-view rationale no longer mentions the dropped password-form path.

Test plan

  • Skim the rendered README on the PR — flow reads cleanly with the single model snippet, no orphan references to :database_authenticatable.
  • Spot-check the new Testing section against lib/activeadmin/oidc/test_helpers.rb — the three method names + the :oidc_mode tag setup match.
  • rake spec:all is green.

Mixed-mode setup (devise :database_authenticatable + :omniauthable on the same model) was carrying its weight as an option in the README, but the gem now mounts session routes unconditionally and the password-form flow it implied isn't something the gem adds value to. Drops the second model snippet and the explanatory paragraph; the gem is positioned as OIDC-only.

Adds a Testing section documenting ActiveAdmin::Oidc::TestHelpers (stub_oidc_sign_in / stub_oidc_failure / reset_oidc_stubs) and the opt-in RSpecSupport.install! filter machinery (for hosts where OIDC is optional and want oidc_mode: tag + CI_RUN_OIDC env filtering).

Minor wording fixes: 'Session routes' description in the engine-features list now notes scope is derived from admin_user_class, not hardcoded; mention that hosts mounting Devise inside an engine need to pass router_name: to devise_for too; updated Custom login view rationale to drop the password-form reference.
@Fivell Fivell changed the title README: drop mixed-mode, document Testing, minor fixes README cleanup; drop unused RSpecSupport module Jun 1, 2026
No host app uses ActiveAdmin::Oidc::RSpecSupport.install! — known consumers either inlined the equivalent four lines of RSpec.configure directly or never integrated TestHelpers at all. The CI_RUN_OIDC env var and automatic :omniauthable skip logic were carrying weight for a use case nobody has.

Removes the RSpecSupport module from lib/activeadmin/oidc/test_helpers.rb. README's Testing section now shows the direct setup (include TestHelpers with :oidc_mode tag + after hook for reset_oidc_stubs).
@Fivell Fivell merged commit c1a91f6 into main Jun 1, 2026
18 checks passed
@Fivell Fivell deleted the readme-cleanup branch June 1, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant