Permalink
Switch branches/tags
Find file Copy path
8f1959b Jul 25, 2017
2 contributors

Users who have contributed to this file

@parkr @bogdanvlviv
executable file 39 lines (29 sloc) 746 Bytes
#!/usr/bin/env ruby
require 'pry'
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
require 'jekyll'
TEST_DIR = File.expand_path("../test", __dir__)
def fixture_site(overrides = {})
Jekyll::Site.new(site_configuration(overrides))
end
def build_configs(overrides, base_hash = Jekyll::Configuration::DEFAULTS)
Jekyll::Utils.deep_merge_hashes(base_hash, overrides)
end
def site_configuration(overrides = {})
build_configs({
"source" => source_dir,
"destination" => dest_dir
}, build_configs(overrides))
end
def dest_dir(*subdirs)
test_dir('dest', *subdirs)
end
def source_dir(*subdirs)
test_dir('source', *subdirs)
end
def test_dir(*subdirs)
File.join(TEST_DIR, *subdirs)
end
module Jekyll
binding.pry
end