From ce228ac1c4b5764dd5d3e107e48ef8da94e01e13 Mon Sep 17 00:00:00 2001 From: Kris Brown Date: Sun, 10 Jan 2010 16:24:56 +0000 Subject: [PATCH] removed accessor method and fixed tests --- lib/jekyll/convertible.rb | 4 ++++ lib/jekyll/post.rb | 9 +++------ test/test_post.rb | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/jekyll/convertible.rb b/lib/jekyll/convertible.rb index fd63f57a0da..f3da5579605 100644 --- a/lib/jekyll/convertible.rb +++ b/lib/jekyll/convertible.rb @@ -3,6 +3,10 @@ # # Requires # self.site -> Jekyll::Site +# self.content= +# self.data= +# self.ext= +# self.output= module Jekyll module Convertible # Return the contents as a string diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index a86f31a2bf2..1d9c70edc5c 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -18,12 +18,9 @@ def self.valid?(name) name =~ MATCHER end - attr_accessor :site, :date, :slug, :ext, :published, :data, :content, :output, :tags - attr_writer :categories - - def categories - @categories ||= [] - end + attr_accessor :site + attr_accessor :data, :content, :output, :ext + attr_accessor :date, :slug, :published, :tags, :categories # Initialize this Post instance. # +site+ is the Site diff --git a/test/test_post.rb b/test/test_post.rb index 6c8aeba5bc7..7b654b05e89 100644 --- a/test/test_post.rb +++ b/test/test_post.rb @@ -36,6 +36,7 @@ def do_render(post) end should "keep date, title, and markup type" do + @post.categories = [] @post.process(@fake_file) assert_equal Time.parse("2008-10-19"), @post.date