Merge pull request #4078 from jekyll/fix-test-warnings
Fix test warnings when doing rake {test,spec} or script/test
This commit is contained in:
commit
3e5a1af234
|
@ -366,11 +366,10 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns -1, 0, +1 or nil depending on whether this doc's path is less than,
|
# Returns -1, 0, +1 or nil depending on whether this doc's path is less than,
|
||||||
# equal or greater than the other doc's path. See String#<=> for more details.
|
# equal or greater than the other doc's path. See String#<=> for more details.
|
||||||
def <=>(anotherDocument)
|
def <=>(other)
|
||||||
cmp = data['date'] <=> anotherDocument.data['date']
|
return nil if !other.respond_to?(:data)
|
||||||
if 0 == cmp
|
cmp = data['date'] <=> other.data['date']
|
||||||
cmp = path <=> anotherDocument.path
|
cmp = path <=> other.path if cmp == 0
|
||||||
end
|
|
||||||
cmp
|
cmp
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -328,7 +328,7 @@ class TestDocument < JekyllUnitTest
|
||||||
end
|
end
|
||||||
|
|
||||||
should "be output in the correct place" do
|
should "be output in the correct place" do
|
||||||
assert_equal true, File.file?(@dest_file)
|
assert File.file?(@dest_file)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -465,7 +465,7 @@ class TestSite < JekyllUnitTest
|
||||||
end
|
end
|
||||||
|
|
||||||
should "print profile table" do
|
should "print profile table" do
|
||||||
@site.liquid_renderer.should_receive(:stats_table)
|
expect(@site.liquid_renderer).to receive(:stats_table)
|
||||||
@site.process
|
@site.process
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue