Sha256: 2240b2716f421d3220cb058a516407b69def6d9a7997cf3e128861d138b29eff

Contents?: true

Size: 743 Bytes

Versions: 2

Compression:

Stored size: 743 Bytes

Contents

require 'fileutils'
require 'active_support/all'
require 'jekyll'
require File.expand_path('lib/jekyll-timeago')

RSpec.configure do |config|
  config.run_all_when_everything_filtered = true
  config.filter_run :focus
  config.order = 'random'

  SOURCE_DIR = File.expand_path('../source', __FILE__)
  DEST_DIR   = File.expand_path('../_site', __FILE__)
  FileUtils.rm_rf(DEST_DIR)
  FileUtils.mkdir_p(DEST_DIR)

  def source_dir(*files)
    File.join(SOURCE_DIR, *files)
  end

  def dest_dir(*files)
    File.join(DEST_DIR, *files)
  end

  def configuration_file
    YAML.load_file(File.join(SOURCE_DIR, '_config.yml'))
  end

  def timeago(from, to = Date.today, options = {})
    Jekyll::Timeago::Core.timeago(from, to, options)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-timeago-0.9.1 spec/spec_helper.rb
jekyll-timeago-0.9.0 spec/spec_helper.rb