Sha256: 38ebb3f88d13c94a1573a11b83d4f5f2cab1e6def4ad01d46fac6557f179619d
Contents?: true
Size: 541 Bytes
Versions: 9
Compression:
Stored size: 541 Bytes
Contents
RSpec::Matchers.define :warn do |message| match do |block| output = fake_stderr(&block) output.include? message end description do "write \"#{message}\" to standard error" end failure_message do "expected to #{description}" end failure_message_when_negated do "expected to not #{description}" end def fake_stderr original_stderr = $stderr $stderr = StringIO.new yield $stderr.string ensure $stderr = original_stderr end def supports_block_expectations? true end end
Version data entries
9 entries across 9 versions & 1 rubygems