Sha256: e29cea099884b88e6838057e9bbe6e5c33c547d78208e216d5ed41b9c5f99e17
Contents?: true
Size: 895 Bytes
Versions: 55
Compression:
Stored size: 895 Bytes
Contents
module Micronaut module Matchers class << self attr_accessor :last_matcher, :last_should def clear_generated_description self.last_matcher = nil self.last_should = nil end def generated_description return nil if last_should.nil? "#{last_should} #{last_description}" end private def last_description last_matcher.respond_to?(:description) ? last_matcher.description : <<-MESSAGE When you call a matcher in an example without a String, like this: specify { object.should matcher } or this: it { should matcher } the runner expects the matcher to have a #describe method. You should either add a String to the example this matcher is being used in, or give it a description method. Then you won't have to suffer this lengthy warning again. MESSAGE end end end end
Version data entries
55 entries across 55 versions & 3 rubygems