env.rb 480 Bytes
Newer Older
Sylvester Keil's avatar
Sylvester Keil committed
1 2 3 4 5 6
begin
  require 'simplecov'
  require 'coveralls' if ENV['CI']
rescue LoadError
  # ignore
end
Sylvester Keil's avatar
Sylvester Keil committed
7

8 9 10 11 12
begin
  require 'debugger'
rescue LoadError
  # ignore
end
13

Sylvester Keil's avatar
Sylvester Keil committed
14 15 16 17
require 'rr'
require 'test/unit'

require 'jekyll/scholar'
Sylvester Keil's avatar
Sylvester Keil committed
18 19 20 21

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

def run_jekyll(options = {})
22

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

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

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

end