removed accessor method and fixed tests

This commit is contained in:
Kris Brown 2010-01-10 16:24:56 +00:00
parent 93c029d62e
commit ce228ac1c4
3 changed files with 8 additions and 6 deletions

View File

@ -3,6 +3,10 @@
# #
# Requires # Requires
# self.site -> Jekyll::Site # self.site -> Jekyll::Site
# self.content=
# self.data=
# self.ext=
# self.output=
module Jekyll module Jekyll
module Convertible module Convertible
# Return the contents as a string # Return the contents as a string

View File

@ -18,12 +18,9 @@ module Jekyll
name =~ MATCHER name =~ MATCHER
end end
attr_accessor :site, :date, :slug, :ext, :published, :data, :content, :output, :tags attr_accessor :site
attr_writer :categories attr_accessor :data, :content, :output, :ext
attr_accessor :date, :slug, :published, :tags, :categories
def categories
@categories ||= []
end
# Initialize this Post instance. # Initialize this Post instance.
# +site+ is the Site # +site+ is the Site

View File

@ -36,6 +36,7 @@ class TestPost < Test::Unit::TestCase
end end
should "keep date, title, and markup type" do should "keep date, title, and markup type" do
@post.categories = []
@post.process(@fake_file) @post.process(@fake_file)
assert_equal Time.parse("2008-10-19"), @post.date assert_equal Time.parse("2008-10-19"), @post.date