rocco/test/helper.rb

21 lines
396 B
Ruby
Raw Permalink Normal View History

rootdir = File.expand_path('../../lib', __FILE__)
$LOAD_PATH.unshift "#{rootdir}/lib"
require 'test/unit'
begin; require 'turn'; rescue LoadError; end
begin
2011-03-05 12:46:51 +00:00
require 'rdiscount'
rescue LoadError
2011-03-05 12:46:51 +00:00
if !defined?(Gem)
require 'rubygems'
retry
end
end
require 'rocco'
def roccoize( filename, contents, options = {} )
2011-03-05 12:46:51 +00:00
Rocco.new( filename, [ filename ], options ) {
contents
}
end