Sha256: fca14777de39cb3395a85eb8bdc361e17844217e1b15b7667f3e22395bfad5f6
Contents?: true
Size: 525 Bytes
Versions: 6
Compression:
Stored size: 525 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
6 entries across 6 versions & 4 rubygems