env.rb 436 Bytes
Newer Older
Sylvester Keil's avatar
Sylvester Keil committed
1 2 3 4 5
require 'rr'
require 'test/unit'

require 'jekyll/scholar'

6 7 8 9 10
begin
  require 'debugger'
rescue LoadError
  # ignore
end
11

Sylvester Keil's avatar
Sylvester Keil committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

World do
  include Test::Unit::Assertions
end

TEST_DIR = File.join('/', 'tmp', 'jekyll')

def run_jekyll(options = {})
  
  options['source'] ||= TEST_DIR
  options['destination'] ||= File.join(TEST_DIR, '_site')
  
  options = Jekyll.configuration(options)

  site = Jekyll::Site.new(options)
  site.process

end