Sha256: ab987a20cfa7c80026430ee480419ae38066fc5e7a4b1f9ee64db28f746f6bf3
Contents?: true
Size: 847 Bytes
Versions: 29
Compression:
Stored size: 847 Bytes
Contents
module RSpec module Support # @private def self.matcher_definitions @matcher_definitions ||= [] end # Used internally to break cyclic dependency between mocks, expectations, # and support. We don't currently have a consistent implementation of our # matchers, though we are considering changing that: # https://github.com/rspec/rspec-mocks/issues/513 # # @private def self.register_matcher_definition(&block) matcher_definitions << block end # Remove a previously registered matcher. Useful for cleaning up after # yourself in specs. # # @private def self.deregister_matcher_definition(&block) matcher_definitions.delete(block) end # @private def self.is_a_matcher?(object) matcher_definitions.any? { |md| md.call(object) } end end end
Version data entries
29 entries across 26 versions & 8 rubygems