Interpolate Jekyll::Page subclass on inspection (#7203)
Merge pull request 7203
This commit is contained in:
parent
58f10f8e8a
commit
9f93fd092f
|
@ -161,7 +161,7 @@ module Jekyll
|
||||||
|
|
||||||
# Returns the object as a debug String.
|
# Returns the object as a debug String.
|
||||||
def inspect
|
def inspect
|
||||||
"#<Jekyll::Page @name=#{name.inspect}>"
|
"#<#{self.class} @name=#{name.inspect}>"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns the Boolean of whether this Page is HTML or not.
|
# Returns the Boolean of whether this Page is HTML or not.
|
||||||
|
|
|
@ -10,9 +10,5 @@ module Jekyll
|
||||||
def read_yaml(*)
|
def read_yaml(*)
|
||||||
@data ||= {}
|
@data ||= {}
|
||||||
end
|
end
|
||||||
|
|
||||||
def inspect
|
|
||||||
"#<Jekyll:PageWithoutAFile @name=#{name.inspect}>"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,6 +33,10 @@ class TestPageWithoutAFile < JekyllUnitTest
|
||||||
@page = setup_page("properties.html")
|
@page = setup_page("properties.html")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "identify itself properly" do
|
||||||
|
assert_equal "#<Jekyll::PageWithoutAFile @name=\"properties.html\">", @page.inspect
|
||||||
|
end
|
||||||
|
|
||||||
should "not have page-content and page-data defined within it" do
|
should "not have page-content and page-data defined within it" do
|
||||||
assert_equal "pages", @page.type.to_s
|
assert_equal "pages", @page.type.to_s
|
||||||
assert_nil @page.content
|
assert_nil @page.content
|
||||||
|
|
Loading…
Reference in New Issue