Sha256: 2f1d627ac2512989a13732343c768de185b268d6b2b6dbf9442a8d5f4e2d8a28

Contents?: true

Size: 781 Bytes

Versions: 3

Compression:

Stored size: 781 Bytes

Contents

require 'bundler/setup'
require 'nanoc'
require_relative '../lib/nanoc-conref-fs'
require 'minitest/autorun'
require 'minitest/pride'
require 'active_support'

FIXTURES_DIR = File.join(Dir.pwd, 'test', 'fixtures')
CONFIG = YAML.load_file(File.join(FIXTURES_DIR, 'nanoc.yaml')).deep_symbolize_keys

class Minitest::Test
  FileUtils.rm_rf File.join(FIXTURES_DIR, 'output')
  FileUtils.rm_rf File.join(FIXTURES_DIR, 'tmp')
end

def read_output_file(dir, name)
  File.read(File.join('output', dir, name, 'index.html')).gsub(/^\s*$/, '')
end

def read_test_file(dir, name)
  File.read(File.join(FIXTURES_DIR, 'content', dir, "#{name}.html")).gsub(/^\s*$/, '')
end

def with_site
  # Yield site
  FileUtils.cd(FIXTURES_DIR) do
    yield Nanoc::Int::SiteLoader.new.new_from_cwd
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nanoc-conref-fs-0.6.8 test/test_helper.rb
nanoc-conref-fs-0.6.7 test/test_helper.rb
nanoc-conref-fs-0.6.6 test/test_helper.rb