Sha256: 2f75bb89cf9246834f2a903bddd3699d610b164974544cba63df3a6a888da8d9
Contents?: true
Size: 967 Bytes
Versions: 1
Compression:
Stored size: 967 Bytes
Contents
require 'colorator' has_failed = false config = File.read("_config.yml") disabled = "#{config}minify_html: false" minify = "#{config}env: production" override_off = "#{config}env: production\nminify_html: false" override_on = "#{config}env: development\nminify_html: true" def test(file) if diff = diff_file(file) puts "Failed #{file}".red puts diff has_failed = true else puts "Passed #{file}".green end end def build `rm -rf site && bundle exec jekyll build --trace` end def diff_file(file) diff = `diff expected/#{file} site/#{file}` if diff.size > 0 && File.exist?("site/#{file}") diff else false end end build tags = %w{content_for footer head include include_plugin include_theme include_theme_override scripts} tags.each { |tag| test("tag_tests/#{tag}.html") } layouts = %w{local plugin_layout theme theme_override} layouts.each { |tag| test("layout_tests/#{tag}.html") } abort if has_failed
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
octopress-ink-1.0.0.alpha.15 | test/test.rb |