File: README — Documentation by YARD 0.9.44

# ⏳️ Rspec::PendingFor

`if ci_badges.map(&:color).detect { it != "green"}` ☝️ let me know, as I may have missed the discord notification.

`if ci_badges.map(&:color).all? { it == "green"}` 👇️ send money so I can do more of this. FLOSS maintenance is now my full-time job.

👣 How will this project approach the September 2025 hostile takeover of RubyGems? 🚑️

I’ve summarized my thoughts in this blog post.

## 🌻 Synopsis

You can do this:

    it("blah is blah") do
      pending_for(:engine => "rbx")
      pending_for(:engine => "truffleruby")
      pending_for(:engine => "ruby", :versions => "2.1.5")
      pending_for(:engine => "jruby", :versions => "2.2.2", :reason => "due to a bug in Ruby")
      pending_for(:engine => "ruby", :versions => "2.0.0", :reason => "because I don't have the time")
      expect("blah").to(eq("blah"))
    end

I expect the current release of this gem to be compatible with Ruby 1.8.7+,
but it is only tested on CI against Ruby 2.3+,
due to the inherent limitations of GitHub Actions.

🚚 Amazing test matrix was brought to you by | 🔎 appraisal2 🔎
--- | ---
👟 Check it out! | ✨ github.com/appraisal-rb/appraisal2 ✨

## 💡 Info you can shake a stick at

Tokens to Remember |
--- | ---
Works with JRuby |
Works with Truffle Ruby |
Works with MRI Ruby 4 |
Works with MRI Ruby 3 |
Works with MRI Ruby 2 |
Works with MRI Ruby 1 |
Support & Community |
Source |
Documentation |
Compliance |
Style |
Maintainer 🎖️ |
`...` 💖 | 🧊 🐙 🛖 🧪

### Compatibility

Compatible with MRI Ruby 1.8.7+, and concordant releases of JRuby, and TruffleRuby.
CI workflows and Appraisals are generated for MRI Ruby 2.4+.
This test floor is configured by `ruby.test_minimum` in `.kettle-jem.yml` and
may be higher than the gem’s runtime compatibility floor when legacy Rubies are
not practical for the current toolchain.

The amazing test matrix is powered by the kettle-dev stack.

How kettle-dev manages complexity in tests

Gem | Source | Role | Daily download rank
--- | --- | --- | ---
appraisal2 | GitHub | multi-dependency Appraisal matrix generation |
appraisal2-rubocop | GitHub | RuboCop Appraisal generator integration |
kettle-dev | GitHub | development, release, and CI workflow tooling |
kettle-jem | GitHub | Appraisals & CI workflow templates |
kettle-soup-cover | GitHub | SimpleCov coverage policy and reporting |
kettle-test | GitHub | standard test runner and coverage harness |
rubocop-lts | GitHub | Ruby-version-aware linting |
turbo_tests2 | GitHub | parallel test execution |

### Federated DVCS

Find this repo on federated forges (Coming soon!)

Federated DVCS Repository | Status | Issues | PRs | Wiki | CI | Discussions
--- | --- | --- | --- | --- | --- | ---
🧪 galtzo-floss/rspec-pending_for on GitLab | The Truth | 💚 | 💚 | 💚 | 🐭 Tiny Matrix | ➖
🧊 galtzo-floss/rspec-pending_for on CodeBerg | An Ethical Mirror (Donate) | 💚 | 💚 | ➖ | ⭕️ No Matrix | ➖
🐙 galtzo-floss/rspec-pending_for on GitHub | Another Mirror | 💚 | 💚 | 💚 | 💯 Full Matrix | 💚
🎮️ Discord Server |  | Let’s | talk | about | this | library!

### Enterprise Support

Available as part of the Tidelift Subscription.

Need enterprise-level guarantees?

The maintainers of this and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.

- 💡Subscribe for support guarantees covering all your FLOSS dependencies
- 💡Tidelift is part of Sonar
- 💡Tidelift pays maintainers to maintain the software you depend on!
  📊`@`Pointy Haired Boss: An enterprise support subscription is “never gonna let you down”, and supports open source maintainers

Alternatively:

## ✨ Installation

Install the gem and add to the application’s Gemfile by executing:

    bundle add rspec-pending_for

If bundler is not being used to manage dependencies, install the gem by executing:

    gem install rspec-pending_for

## ⚙️ Configuration

The gem autoconfigures itself for use in your Rspec suite.
Just add this line to yous `spec_helper.rb`:

    require "rspec/pending_for"

## 🔧 Basic Usage

To mark a spec pending for a specific ruby engine, and/or versions:

    it("blah is blah") do
      pending_for(:engine => "ruby", :versions => "2.1.5")
      expect("blah").to(eq("blah"))
    end

To skip a spec for a specific ruby engine, and/or versions:

    it("blah is blah") do
      skip_for(:engine => "ruby", :versions => "2.1.5")
      expect("blah").to(eq("blah"))
    end

To mark a spec pending for all versions of a given engine:

    it("blah is blah") do
      pending_for(:engine => "jruby")
      expect("blah").to(eq("blah"))
    end

To mark a spec pending for a custom reason (overriding the default message):

    it("blah is blah") do
      pending_for(:engine => "jruby", :reason => "This does not work on JRuby")
      expect("blah").to(eq("blah"))
    end

To mark a spec pending or skipped for multiple engines and versions, just what you would expect:

    it("blah is blah") do
      skip_for(:engine => "jruby", :reason => "This does not work on JRuby so skipping for now") # All JRuby versions will be skipped
      pending_for(:engine => "rbx", :reason => "This does not work on Rubinius so pending for now") # All rbx versions will be pending
      pending_for(:engine => "ruby", :versions => ["1.9.3", "2.0.0", "2.1.0"]) # uses the default message
      expect("blah").to(eq("blah"))
    end

### 📦 Specifying versions: supported forms and examples

The :versions option accepts several forms. You can also omit :engine to match any engine. The library compares using RubyVersion and Gem::Version rules and supports MRI, JRuby, and TruffleRuby.

Supported forms for :versions:

- String: exact match to RUBY_VERSION, e.g., “3.2.4”.
- String “head”: matches head/dev/SNAPSHOT builds such as ruby-head, jruby-head,
  and truffleruby-head.
- Array of strings or ranges: any entry that matches will trigger pending/skip.
- Range of Gem::Version: inclusive/exclusive endpoints are respected.
- Range of Integer: compares only the major version (e.g., 2..3 matches Ruby 2.x and 3.x depending on inclusive/exclusive).

Notes:

- If :engine is omitted, the version spec applies to whatever Ruby engine is running.
- If :versions is omitted and :engine is provided, all versions for that engine are matched.
- JRuby and TruffleRuby are matched using their RUBY_VERSION compatibility for Integer and Gem::Version ranges.
- Strings must either match the full version string exactly, or only specify a partial version.
  - there is no parsing of comparison operators like “>= 3.1”.
  - Specifying “head” will match head/dev/SNAPSHOT builds.
  - Specifying “3.1” will match “3.1.x”, but not “3.0.x” or “3.2.x”.
  - Specifying “3” will match “3.0.x”, “3.1.x”, “3.2.x”, etc, but not “2.7.x” or “4.0.x”.

Examples

1) Exact version string

    it "pend only on Ruby 3.2.4" do
      pending_for(:engine => :ruby, :versions => "3.2.4")
      # ...
    end

2) Multiple exact versions

    it "pend on a set of MRI versions" do
      pending_for(:engine => :ruby, :versions => ["2.7.10", "3.0.7", "3.1.6"])
    end

3) Match any engine by version (no :engine)

    it "skip on any engine if the Ruby version equals 2.7.8" do
      skip_for(:versions => "2.7.8", :reason => "Known upstream incompatibility on this patch release")
    end

4) Match a head build for a specific engine

    it "skips only on JRuby head" do
      skip_for(:engine => :jruby, :versions => "head", :reason => "Known upstream JRuby head regression")
    end

5) Range of Gem::Version (inclusive)

    it "pend for MRI >= 2.6.0 and <= 3.0.0" do
      pending_for(
        :engine => :ruby,
        :versions => (Gem::Version.new("2.6.0")..Gem::Version.new("3.0.0"))
      )
    end

6) Range of Gem::Version (exclusive end)

    it "skip for MRI >= 3.1.0 and < 3.3.0" do
      skip_for(
        :engine => :ruby,
        :versions => (Gem::Version.new("3.1.0")...Gem::Version.new("3.3.0"))
      )
    end

7) Range of Integer (major versions)

    it "pend on all Ruby 2.x and 3.x" do
      pending_for(:versions => (2..3), :reason => "Major series currently affected")
    end

    it "skip on Ruby 2.x but not 3.x" do
      skip_for(:versions => (2...3)) # 2 <= version < 3
    end

Edge cases and tips

- If you pass a mismatched Range (e.g., begin/end types differ), the library will attempt cover? with string comparison, which typically won’t match; prefer the supported forms above.
- Provide :reason to override the default message in your reports.
- Engines recognized include: “ruby” (MRI), “jruby”, “truffleruby”, plus historical ones like “rbx”. Unknown engines will emit a warning.

### Using with RSpec tags

rspec-pending_for plays nicely with RSpec metadata tags. You can auto-skip or auto-pend examples based on tags via a before hook. This example also demonstrates the array form for :versions using %w[]:

    require "rspec/pending_for"

    RSpec.configure do |config|
      config.include(Rspec::PendingFor)

      # Auto-skip examples that require Bundler >= 2.7 (which implies Ruby >= 3.2)
      config.before(:each, :bundler_27_only) do
        # Skip on Ruby < 3.2 using rspec-pending_for's version matcher
        skip_for(
          :reason => "Requires Bundler >= 2.7 which is unavailable on Ruby < 3.2",
          :versions => ["2.3", "2.4", "2.5", "2.6", "2.7", "3.0", "3.1"]
        )
      end
    end

    RSpec.describe("something") do
      it "runs only where Bundler 2.7+ is available", :bundler_27_only do
        # ... your example code ...
      end
    end

Notes:

- The tag :bundler_27_only can be applied to individual examples or groups.
- The versions array is matched against RUBY_VERSION (e.g., 3.1.x) when :engine is omitted.
- Use :reason to make the report message explicit.

### Environment Variables

Below are the primary environment variables recognized by rspec-pending_for (and its integrated tools). Unless otherwise noted, set boolean values to the string “true” to enable.

General/runtime

- DEBUG: Enable extra internal logging for this library (default: false)
- REQUIRE_BENCH: Enable `require_bench` to profile requires (default: false)
- CI: When set to true, adjusts default rake tasks toward CI behavior

Coverage (kettle-soup-cover / SimpleCov)

- K_SOUP_COV_DO: Enable coverage collection (default: true in .envrc)
- K_SOUP_COV_FORMATTERS: Comma-separated list of formatters (html, xml, rcov, lcov, json, tty)
- K_SOUP_COV_MIN_LINE: Minimum line coverage threshold (integer, e.g., 100)
- K_SOUP_COV_MIN_BRANCH: Minimum branch coverage threshold (integer, e.g., 100)
- K_SOUP_COV_MIN_HARD: Fail the run if thresholds are not met (true/false)
- K_SOUP_COV_MULTI_FORMATTERS: Enable multiple formatters at once (true/false)
- K_SOUP_COV_OPEN_BIN: Path to browser opener for HTML (empty disables auto-open)
- MAX_ROWS: Limit console output rows for simplecov-console (e.g., 1)
  Tip: When running a single spec file locally, you may want `K_SOUP_COV_MIN_HARD=false` to avoid failing thresholds for a partial run.

GitHub API and CI helpers

- GITHUB_TOKEN or GH_TOKEN: Token used by `ci:act` and release workflow checks to query GitHub Actions status at higher rate limits

Releasing and signing

- SKIP_GEM_SIGNING: If set, skip gem signing during build/release
- GEM_CERT_USER: Username for selecting your public cert in `certs/<USER>.pem` (defaults to $USER)
- SOURCE_DATE_EPOCH: Reproducible build timestamp. `kettle-release` will set this automatically for the session.

Git hooks and commit message helpers (exe/kettle-commit-msg)

- GIT_HOOK_BRANCH_VALIDATE: Branch name validation mode (e.g., `jira`) or `false` to disable
- GIT_HOOK_FOOTER_APPEND: Append a footer to commit messages when goalie allows (true/false)
- GIT_HOOK_FOOTER_SENTINEL: Required when footer append is enabled — a unique first-line sentinel to prevent duplicates
- GIT_HOOK_FOOTER_APPEND_DEBUG: Extra debug output in the footer template (true/false)

For a quick starting point, this repository’s `.envrc` shows sane defaults, and `.env.local` can override them locally.

## 🦷 FLOSS Funding

While galtzo-floss tools are free software and will always be, the project would benefit immensely from some funding.
Raising a monthly budget of… “dollars” would make the project more sustainable.

We welcome both individual and corporate sponsors! We also offer a
wide array of funding channels to account for your preferences.
Currently, Open Collective is our preferred funding platform.

If you’re working in a company that’s making significant use of galtzo-floss tools we’d
appreciate it if you suggest to your company to become a galtzo-floss sponsor.

You can support the development of galtzo-floss tools via
GitHub Sponsors,
Liberapay,
PayPal,
Open Collective
and Tidelift.

📍 NOTE
If doing a sponsorship in the form of donation is problematic for your company from an accounting standpoint, we’d recommend the use of Tidelift, where you can get a support-like subscription instead.

### Open Collective for Individuals

Support us with a monthly donation and help us continue our activities. [Become a backer]

NOTE: kettle-readme-backers updates this list every day, automatically.

No backers yet. Be the first!

### Open Collective for Organizations

Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor]

NOTE: kettle-readme-backers updates this list every day, automatically.

No sponsors yet. Be the first!

### Another way to support open-source

I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈‍ cats).

If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in `bundle fund`.

I’m developing a new library, floss_funding, designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.

Floss-Funding.dev: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags

## 🔐 Security

See SECURITY.md.

## 🤝 Contributing

If you need some ideas of where to help, you could work on adding more code coverage,
or if it is already 💯 (see below) check issues or PRs,
or use the gem and think about how it could be better.

We so if you make changes, remember to update it.

See CONTRIBUTING.md for more detailed instructions.

### 🚀 Release Instructions

See CONTRIBUTING.md.

### Code Coverage

Coverage service badges

### 🪇 Code of Conduct

Everyone interacting with this project’s codebases, issue trackers,
chat rooms and mailing lists agrees to follow the .

## 🌈 Contributors

Made with contributors-img.

Also see GitLab Contributors: https://gitlab.com/galtzo-floss/rspec-pending_for/-/graphs/main

⭐️ Star History

</a>

## 📌 Versioning

This library follows for its public API where practical.
For most applications, prefer the Pessimistic Version Constraint with two digits of precision.

For example:

    spec.add_dependency("rspec-pending_for", "~> 0.0")

📌 Is "Platform Support" part of the public API? More details inside.

Dropping support for a platform can be a breaking change for affected users. If a release changes supported platforms, it should be called out clearly in the changelog and versioned with that impact in mind.

To get a better understanding of how SemVer is intended to work over a project’s lifetime, read this article from the creator of SemVer:

- “Major Version Numbers are Not Sacred”

See CHANGELOG.md for a list of releases.

## 📄 License

The gem is available as open source under the terms of
the MIT .

### © Copyright

See LICENSE.md for the official copyright notice.

Copyright holders

- Copyright (c) 2015, 2017-2018, 2020-2022, 2025-2026 Peter H. Boling
- Copyright (c) 2025 Aboling0

## 🤑 A request for help

Maintainers have teeth and need to pay their dentists.
After getting laid off in an RIF in March, and encountering difficulty finding a new one,
I began spending most of my time building open source tools.
I’m hoping to be able to pay for my kids’ health insurance this month,
so if you value the work I am doing, I need your support.
Please consider sponsoring me or the project.

To join the community or get help 👇️ Join the Discord.

To say “thanks!” ☝️ Join the Discord or 👇️ send money.

💌 💌 💌

### Please give the project a star ⭐ ♥.

Many parts of this project are actively managed by a kettle-jem smart template utilizing StructuredMerge.org merge contracts.

Thanks for RTFM. ☺️