env.rb 527 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 22 23 24 25

World do
  include Test::Unit::Assertions
end

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

def run_jekyll(options = {})
26

Sylvester Keil's avatar
Sylvester Keil committed
27 28
  options['source'] ||= TEST_DIR
  options['destination'] ||= File.join(TEST_DIR, '_site')
29

Sylvester Keil's avatar
Sylvester Keil committed
30 31 32 33 34 35
  options = Jekyll.configuration(options)

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

end