Sha256: 67dceab471001ec2108f7cf71f77f78f6e5370c1af8896524f0159562b6b510b
Contents?: true
Size: 925 Bytes
Versions: 1
Compression:
Stored size: 925 Bytes
Contents
require "rubygems" require "jekyll" require "liquid" require 'test/unit' require 'shoulda' require "html/pipeline" require "jekyll-html-pipeline" # Send STDERR into the void to suppress program output messages # STDERR.reopen(test(?e, '/dev/null') ? '/dev/null' : 'NUL:') class Test::Unit::TestCase 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jekyll-html-pipeline-0.1.0 | test/helper.rb |