Sha256: 0f301e491cc3914b03e1c42dd5e67dd75f6a54e596127167ba45499a5f105a1a
Contents?: true
Size: 801 Bytes
Versions: 12
Compression:
Stored size: 801 Bytes
Contents
require "rspec" # loaded before simplecov to also capture parse time warnings require "support/fail_rspec_on_ruby_warning" require "simplecov" SimpleCov.coverage_dir("tmp/coverage") def source_fixture(filename) File.expand_path(File.join(File.dirname(__FILE__), "fixtures", filename)) end # Taken from http://stackoverflow.com/questions/4459330/how-do-i-temporarily-redirect-stderr-in-ruby require "stringio" def capture_stderr # The output stream must be an IO-like object. In this case we capture it in # an in-memory IO object so we can return the string value. You can assign any # IO object here. previous_stderr = $stderr $stderr = StringIO.new yield $stderr.string ensure # Restore the previous value of stderr (typically equal to STDERR). $stderr = previous_stderr end
Version data entries
12 entries across 12 versions & 5 rubygems