Rspec::PendingFor
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 |
|
---|---|
Works with JRuby |
|
Works with Truffle Ruby |
|
Works with MRI Ruby 3 |
|
Works with MRI Ruby 2 |
|
Works with MRI Ruby 1 | |
Source |
|
Documentation |
|
Compliance |
|
Expert 1:1 Support |
or |
Enterprise Support |
๐ก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 ๐๏ธ |
|
... ๐ |
|
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 so if you make changes, remember to update it.
See CONTRIBUTING.md for more detailed instructions.
Code Coverage
๐ช Code of Conduct
Everyone interacting in this project's codebases, issue trackers,
chat rooms and mailing lists is expected to follow the .
๐ Contributors
Made with contributors-img.
Also see GitLab Contributors: https://gitlab.com/pboling/rspec-pending_for/-/graphs/main
โญ๏ธ Star History
๐ Versioning
This Library adheres to .
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
- Jordan Harband (@ljharb) in SemVer issue 716
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 .
See LICENSE.txt for the official Copyright Notice.
ยฉ Copyright
Copyright (c) 2015 - 2018, 2020 - 2022, 2025 Peter H. Boling,
RailsBling.com
๐ค 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.