Open-Source Wikis

/

GitLab

/

Packages

/

gitlab-rspec

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 — set ENV for 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_stdout and silence_stderr blocks.
  • 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.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

gitlab-rspec – GitLab wiki | Factory