Fix rubocop offenses on master.
This commit is contained in:
parent
3a76ddf7a2
commit
a7d25ed963
|
|
@ -2,7 +2,7 @@ module Jekyll
|
||||||
class EntryFilter
|
class EntryFilter
|
||||||
attr_reader :site
|
attr_reader :site
|
||||||
SPECIAL_LEADING_CHARACTERS = [
|
SPECIAL_LEADING_CHARACTERS = [
|
||||||
".", "_", '#', "~"
|
".", "_", "#", "~"
|
||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
def initialize(site, base_directory = nil)
|
def initialize(site, base_directory = nil)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class TestFilters < JekyllUnitTest
|
||||||
"destination" => dest_dir,
|
"destination" => dest_dir,
|
||||||
"timezone" => "UTC"
|
"timezone" => "UTC"
|
||||||
})
|
})
|
||||||
@sample_time = Time.utc(2013, 03, 27, 11, 22, 33)
|
@sample_time = Time.utc(2013, 3, 27, 11, 22, 33)
|
||||||
@sample_date = Date.parse("2013-03-27")
|
@sample_date = Date.parse("2013-03-27")
|
||||||
@time_as_string = "September 11, 2001 12:46:30 -0000"
|
@time_as_string = "September 11, 2001 12:46:30 -0000"
|
||||||
@time_as_numeric = 1_399_680_607
|
@time_as_numeric = 1_399_680_607
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class TestKramdown < JekyllUnitTest
|
||||||
end
|
end
|
||||||
|
|
||||||
should "run Kramdown" do
|
should "run Kramdown" do
|
||||||
assert_equal "<h1>Some Header</h1>", @markdown.convert('# Some Header #').strip
|
assert_equal "<h1>Some Header</h1>", @markdown.convert("# Some Header #").strip
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when asked to convert smart quotes" do
|
context "when asked to convert smart quotes" do
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class TestPage < JekyllUnitTest
|
||||||
end
|
end
|
||||||
|
|
||||||
should "create url with non-alphabetic characters" do
|
should "create url with non-alphabetic characters" do
|
||||||
@page = setup_page("+", '%# +.md')
|
@page = setup_page("+", "%# +.md")
|
||||||
assert_equal "/+/%25%23%20+.html", @page.url
|
assert_equal "/+/%25%23%20+.html", @page.url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -268,12 +268,12 @@ class TestPage < JekyllUnitTest
|
||||||
end
|
end
|
||||||
|
|
||||||
should "write even when permalink has '%# +'" do
|
should "write even when permalink has '%# +'" do
|
||||||
page = setup_page("+", '%# +.md')
|
page = setup_page("+", "%# +.md")
|
||||||
do_render(page)
|
do_render(page)
|
||||||
page.write(dest_dir)
|
page.write(dest_dir)
|
||||||
|
|
||||||
assert File.directory?(dest_dir)
|
assert File.directory?(dest_dir)
|
||||||
assert_exist dest_dir("+", '%# +.html')
|
assert_exist dest_dir("+", "%# +.html")
|
||||||
end
|
end
|
||||||
|
|
||||||
should "write properly without html extension" do
|
should "write properly without html extension" do
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue