Sha256: bcb483d1d934fd6dbaa2ccc7829e1f4c037f4bde557e655dbc6365b9f77f741d

Contents?: true

Size: 998 Bytes

Versions: 2

Compression:

Stored size: 998 Bytes

Contents

require 'coveralls'
Coveralls.wear!

# Previous content of test helper now starts here

# Minitest
require 'minitest/autorun'
# require 'minitest/pride' # for colored output
# require 'test_notifier/runner/minitest' # for a notifier

# TestUnit -> MiniTest (TestUnit is only compatibility Layer)
# require 'test/unit'

# Load Rack::Blogengine gem
require 'rack/blogengine'

# class Hash
  # method for usage with assert_boolean
  # -> for failing it needs nil instead of false (which #has_key? returns in failing case)
  # NOT Needed use assert_true instead...
  # def hash_key?(key)
  #   if self.has_key?(key)
  #	    return true
  #	  else
  #	    return nil
  #	  end
  # end
# end

#
# Opening Kernel for testpath method
#
# @author [benny]
#
module Kernel
  def testpath
    "#{Rack::Blogengine.root}/testfolder"
  end
end

def capture_stdout(&block)
  original_stdout = $stdout
  $stdout = fake = StringIO.new
  begin
    yield
  ensure
    $stdout = original_stdout
  end
  fake.string
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-blogengine-0.2.3 test/test_helper.rb
rack-blogengine-0.2.2 test/test_helper.rb