gitlab-org/gitlab
gitlab-rspec
Shared RSpec helpers reused by the monolith and the in-tree gems.
Source
gems/gitlab-rspec/. Re-usable matchers, helpers, and shared examples.
Highlights
stub_env— setENVfor one example.stub_const— replace a constant safely.eventually_consistent_test— retry a block while the assertion would have failed (for race-prone tests).silence_stdoutandsilence_stderrblocks.- Helpers that compose with other testing libraries (FactoryBot, WebMock, Sidekiq).
Why a gem
The monolith's spec/support/ is huge and Rails-aware. The gem version offers the subset that small gems can use without booting Rails.
Related
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.