Sha256: ba86c970d5c147607fbd6dd79b6ff0ad159a4e9110bd7af4457b21670759b7f2

Contents?: true

Size: 752 Bytes

Versions: 2

Compression:

Stored size: 752 Bytes

Contents

require 'fileutils'
require 'rr'
require 'test/unit'
require 'time'

TEST_DIR    = File.join('/', 'tmp', 'jekyll')
JEKYLL_PATH = File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jekyll')

def run_jekyll(opts = {})
  command = JEKYLL_PATH.clone
  command << " build"
  command << " --drafts" if opts[:drafts]
  command << " >> /dev/null 2>&1" if opts[:debug].nil?
  system command
end

def slug(title)
  title.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
end

def location(folder, direction)
  if folder
    before = folder if direction == "in"
    after = folder if direction == "under"
  end
  [before || '.', after || '.']
end

# work around "invalid option: --format" cucumber bug (see #296)
Test::Unit.run = true if RUBY_VERSION < '1.9'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-1.0.4 features/support/env.rb
jekyll-1.0.3 features/support/env.rb