env.rb 396 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
require 'debugger'

Sylvester Keil's avatar
Sylvester Keil committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

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