Rubocop fixes for test/test_front_matter_defaults.rb

This commit is contained in:
Brint O'Hearn 2016-05-15 22:05:28 -05:00
parent c8cae38da6
commit 555b2fbe72
2 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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