env.rb 432 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

World do
  include Test::Unit::Assertions
end

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

def run_jekyll(options = {})
20

Sylvester Keil's avatar
Sylvester Keil committed
21
22
  options['source'] ||= TEST_DIR
  options['destination'] ||= File.join(TEST_DIR, '_site')
23

Sylvester Keil's avatar
Sylvester Keil committed
24
25
26
27
28
29
  options = Jekyll.configuration(options)

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

end