module Rspec::PendingFor
Use with Rspec
by including in your example groups, just like any other Rspec
helpers:
RSpec.configure do |c| c.include Rspec::PendingFor end
Constants
- VERSION
Public Instance Methods
pending_for(options = {})
click to toggle source
How to pend specs that break due to bugs in Ruby interpreters or versions
it("blah is blah") do pending_for(engine: "ruby", versions: "2.1.5") expect("blah").to eq "blah" end
Not using named parameters because still supporting Ruby 1.9
# File lib/rspec/pending_for.rb, line 26 def pending_for(options = {}) modify_example_with(:pending, options) end
skip_for(options = {})
click to toggle source
How to pend specs that break due to bugs in Ruby interpreters or versions
it("blah is blah") do skip_for(engine: "jruby", versions: "2.2.2") expect("blah").to eq "blah" end
Not using named parameters because still supporting Ruby 1.9
# File lib/rspec/pending_for.rb, line 38 def skip_for(options = {}) modify_example_with(:skip, options) end
Private Instance Methods
modify_example_with(message, options)
click to toggle source
# File lib/rspec/pending_for.rb, line 44 def modify_example_with(message, options) raise(EngineOrVersionsRequired, :pending_for) unless options[:engine] || options[:versions] build = Build.new(options) send(message, build.message) if build.current_matches_specified? end