Sha256: 1da8bb69e5116623aa6ea792726b4f51037e5e070da1636b1dc91fc63221eeed
Contents?: true
Size: 1.21 KB
Versions: 9
Compression:
Stored size: 1.21 KB
Contents
if RUBY_VERSION > '1.9' require 'simplecov' require 'simplecov-gem-adapter' SimpleCov.start('gem') require 'coveralls' Coveralls.wear_merged! end require 'rubygems' require 'test/unit' require 'ostruct' gem 'RedCloth', '>= 4.2.1' require 'jekyll' require 'RedCloth' require 'rdiscount' require 'kramdown' require 'redcarpet' require 'redgreen' if RUBY_VERSION < '1.9' require 'shoulda' require 'rr' include Jekyll # Send STDERR into the void to suppress program output messages STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:') class Test::Unit::TestCase include RR::Adapters::TestUnit def dest_dir(*subdirs) test_dir('dest', *subdirs) end def source_dir(*subdirs) test_dir('source', *subdirs) end def clear_dest FileUtils.rm_rf(dest_dir) end def test_dir(*subdirs) File.join(File.dirname(__FILE__), *subdirs) end def directory_with_contents(path) FileUtils.rm_rf(path) FileUtils.mkdir(path) File.open("#{path}/index.html", "w"){ |f| f.write("I was previously generated.") } end def capture_stdout $old_stdout = $stdout $stdout = StringIO.new yield $stdout.rewind return $stdout.string ensure $stdout = $old_stdout end end
Version data entries
9 entries across 9 versions & 1 rubygems