Rspec::PendingFor

Version License: MIT Downloads Rank Open Source Helpers Depfu CodeCov Test Coverage Coveralls Test Coverage CodeClimate Test Coverage Maintainability CI Heads CI Current CI Truffle Ruby CI JRuby CI Supported CI Legacy CI Unsupported CI Ancient CI Hoary CI Fusty CI Test Coverage CI Style


Liberapay Patrons Sponsor Me on Github Buy me a coffee Polar Shield Donate to my FLOSS or refugee efforts at ko-fi.com Donate to my FLOSS or refugee efforts using Patreon

Easiest to just show you:

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 1.9.3+, due to the inherent limitations of GitHub Actions.

Info you can shake a stick at

Tokens to Remember Gem name Gem namespace
Works with JRuby JRuby 9.1 Compat JRuby 9.2 Compat JRuby 9.3 Compat JRuby 9.4 Compat JRuby HEAD Compat
Works with Truffle Ruby Truffle Ruby 22.3 Compat Truffle Ruby 23.0 Compat Truffle Ruby 23.1 Compat Truffle Ruby 24.1 Compat Truffle Ruby HEAD Compat
Works with MRI Ruby 3 Ruby 3.0 Compat Ruby 3.1 Compat Ruby 3.2 Compat Ruby 3.3 Compat Ruby 3.4 Compat Ruby HEAD Compat
Works with MRI Ruby 2 Ruby 2.0 Compat Ruby 2.1 Compat Ruby 2.2 Compat Ruby 2.3 Compat Ruby 2.4 Compat Ruby 2.5 Compat Ruby 2.6 Compat Ruby 2.7 Compat
Works with MRI Ruby 1 Ruby 1.9 Compat
Source Source on GitLab.com Source on Github.com The best SHA: dQw4w9WgXcQ!
Documentation Current release on RubyDoc.info HEAD on RubyDoc.info BDFL Blog Wiki
Compliance License: MIT πŸ“„ilo-declaration-img Security Policy CodeQL Contributor Covenant 2.1 SemVer 2.0.0 Keep-A-Changelog 1.0.0
Expert 1:1 Support Get help from me on Upwork or Get help from me on Codementor
Enterprise Support Get help from me on Tidelift
πŸ’‘Subscribe for support guarantees covering all 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!
Comrade BDFL πŸŽ–οΈ Follow Me on LinkedIn Follow Me on Ruby.Social Follow Me on Bluesky Contact BDFL My technical writing
... πŸ’– Find Me on WellFound: Find Me on CrunchBase My LinkTree More About Me

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

Usage

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

require "rspec/pending_for"

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 => %w(1.9.3 2.0.0 2.1.0)) # uses the default message
  expect("blah").to(eq("blah"))
end

πŸ” 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) then check issues, or PRs, or use the gem and think about how it could be better.

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

See CONTRIBUTING.md for more detailed instructions.

Code Coverage

Coverage Graph

πŸͺ‡ Code of Conduct

Everyone interacting in this project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the Contributor Covenant 2.1.

🌈 Contributors

Contributors

Made with contributors-img.

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

⭐️ Star History

Star History Chart

πŸ“Œ Versioning

This Library adheres to Semantic Versioning 2.0.0. Violations of this scheme should be reported as bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be immediately released that restores compatibility. Breaking changes to the public API will only be introduced with new major versions.

πŸ“Œ Is "Platform Support" part of the public API?

Yes. But I'm obligated to include notes...

SemVer should, but doesn't explicitly, say that dropping support for specific Platforms is a breaking change to an API. It is obvious to many, but not all, and since the spec is silent, the bike shedding is endless.

dropping support for a platform is both obviously and objectively a breaking change

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:

As a result of this policy, and the interpretive lens used by the maintainer, you can (and should) specify a dependency on these libraries using the Pessimistic Version Constraint with two digits of precision.

For example:

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

See CHANGELOG.md for list of releases.

πŸ“„ License

The gem is available as open source under the terms of the MIT License License: MIT. See LICENSE.txt for the official Copyright Notice.

Copyright (c) 2015 - 2018, 2020 - 2022, 2025 Peter H. Boling, RailsBling.com Rails Bling

πŸ€‘ One more thing

You made it to the bottom of the page, so perhaps you'll indulge me for another 20 seconds. I maintain many dozens of gems, including this one, because I want Ruby to be a great place for people to solve problems, big and small. Please consider supporting my efforts via the giant yellow link below, or one of the others at the head of this README.

Buy me a latte