Sha256: bf25f153b13eae200d356efd6e79ef93a8df3f593570eb1e54a3d99aa2d7887e
Contents?: true
Size: 520 Bytes
Versions: 28
Compression:
Stored size: 520 Bytes
Contents
module Matchy::Expectations class BeAExpectation < Base def matches?(receiver) @receiver = receiver @receiver.is_a?(@expected) end def failure_message "Expected #{@receiver.inspect} to be a #{@expected.inspect}." end def negative_failure_message "Expected #{@receiver.inspect} to not be a #{@expected.inspect}." end end module TestCaseExtensions def be_a(obj) Matchy::Expectations::BeAExpectation.new(obj, self) end alias :be_an :be_a end end
Version data entries
28 entries across 28 versions & 8 rubygems