Sha256: ed174e6fe6bd84890330b72a71dc95d9538a7de322d0abd7813d8efc7297d8aa

Contents?: true

Size: 984 Bytes

Versions: 18

Compression:

Stored size: 984 Bytes

Contents

require 'bundler/setup'
require 'simplecov'
require 'test/unit'
require 'shoulda'

SimpleCov.coverage_dir('tmp/coverage')

class Test::Unit::TestCase
  def source_fixture(filename)
    File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', filename))
  end

  # Keep 1.8-rubies from complaining about missing tests in each file that covers only 1.9 functionality
  def default_test
  end
  
end

require 'shoulda_macros'
Test::Unit::TestCase.send :extend, ShouldaMacros

# 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

18 entries across 18 versions & 2 rubygems

Version Path
challah-0.6.1 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.6.0 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.5.4 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.5.3 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.5.2 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.5.0 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.4.1 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.4.0 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.3.5 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.3.4 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.3.3 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.3.2 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.3.1 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.3.0 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.2.1 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
challah-0.2.0 vendor/bundle/gems/simplecov-0.5.4/test/helper.rb
simplecov-0.5.4 test/helper.rb
simplecov-0.5.3 test/helper.rb