From 555b2fbe72a2bbcba173205f465ad287dc44114c Mon Sep 17 00:00:00 2001 From: Brint O'Hearn Date: Sun, 15 May 2016 22:05:28 -0500 Subject: [PATCH] Rubocop fixes for test/test_front_matter_defaults.rb --- .rubocop.yml | 1 - test/test_front_matter_defaults.rb | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 5195d933..4a1b4fea 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -74,7 +74,6 @@ AllCops: - test/test_document.rb - test/test_entry_filter.rb - test/test_filters.rb - - test/test_front_matter_defaults.rb - test/test_generated_site.rb - test/test_kramdown.rb - test/test_layout_reader.rb diff --git a/test/test_front_matter_defaults.rb b/test/test_front_matter_defaults.rb index 8eeed7f3..4be4ce2f 100644 --- a/test/test_front_matter_defaults.rb +++ b/test/test_front_matter_defaults.rb @@ -1,7 +1,6 @@ -require 'helper' +require "helper" class TestFrontMatterDefaults < JekyllUnitTest - context "A site with full front matter defaults" do setup do @site = Site.new(Jekyll.configuration({ @@ -69,7 +68,7 @@ class TestFrontMatterDefaults < JekyllUnitTest }] })) @site.process - @affected = @site.posts.docs.find { |page| page.relative_path =~ /win\// } + @affected = @site.posts.docs.find { |page| page.relative_path =~ %r!win\/! } @not_affected = @site.pages.find { |page| page.relative_path == "about.html" } end @@ -100,7 +99,8 @@ class TestFrontMatterDefaults < JekyllUnitTest should "affect only the specified type and all paths" do assert_equal @affected.reject { |page| page.data["key"] == "val" }, [] - assert_equal @not_affected.reject { |page| page.data["key"] == "val" }, @not_affected + assert_equal @not_affected.reject { |page| page.data["key"] == "val" }, + @not_affected end end @@ -125,7 +125,8 @@ class TestFrontMatterDefaults < JekyllUnitTest should "affect only the specified type and all paths" do assert_equal @affected.reject { |page| page.data["key"] == "val" }, [] - assert_equal @not_affected.reject { |page| page.data["key"] == "val" }, @not_affected + assert_equal @not_affected.reject { |page| page.data["key"] == "val" }, + @not_affected end end @@ -199,5 +200,4 @@ class TestFrontMatterDefaults < JekyllUnitTest assert @site.posts.find { |page| page.data["date"] == date } end end - end