class RSpec::Maybes::MaybeHandler
Public Class Methods
handle_matcher(actual, initial_matcher, message = nil, &block)
click to toggle source
# File lib/rspec/maybes/handlers.rb, line 16 def self.handle_matcher(actual, initial_matcher, message = nil, &block) matcher = Expectations::ExpectationHelper.setup(self, initial_matcher, message) matcher.instance_variable_set(:@actual, actual) return matcher end
passes?(matcher)
click to toggle source
# File lib/rspec/maybes/handlers.rb, line 22 def self.passes?(matcher) matcher.on_your_machine? || rand < 0.9 end