Sha256: 9638de9cf613cdb2299837f9ab26861549c71d20af1b516677c8b1c7aa4b2e47

Contents?: true

Size: 694 Bytes

Versions: 26

Compression:

Stored size: 694 Bytes

Contents

require "simplecov"
require "rspec"

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

26 entries across 26 versions & 6 rubygems

Version Path
dirwatch-0.0.9 vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/helper.rb
dirwatch-0.0.8 vendor/bundle/ruby/2.5.0/gems/simplecov-0.13.0/spec/helper.rb
dirwatch-0.0.6 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/spec/helper.rb
dirwatch-0.0.5 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/spec/helper.rb
dirwatch-0.0.4 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/spec/helper.rb
dirwatch-0.0.3 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/spec/helper.rb
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/simplecov-0.13.0/spec/helper.rb
simplecov-0.13.0 spec/helper.rb
abaci-0.3.0 vendor/bundle/gems/simplecov-0.12.0/spec/helper.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/simplecov-0.12.0/spec/helper.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/simplecov-0.12.0/spec/helper.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/simplecov-0.12.0/spec/helper.rb
cvss-suite-1.0.8 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/helper.rb
simplecov-0.12.0 spec/helper.rb
cvss-suite-1.0.7 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/helper.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/simplecov-0.11.2/spec/helper.rb
cvss-suite-1.0.6 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/helper.rb
cvss-suite-1.0.5 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/helper.rb
cvss-suite-1.0.4 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/helper.rb
cvss-suite-1.0.3 vendor/cache/ruby/2.2.0/gems/simplecov-0.11.2/spec/helper.rb