Skip to content

Commit ce228ac

Browse files
committed
removed accessor method and fixed tests
1 parent 93c029d commit ce228ac

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

lib/jekyll/convertible.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
#
44
# Requires
55
# self.site -> Jekyll::Site
6+
# self.content=
7+
# self.data=
8+
# self.ext=
9+
# self.output=
610
module Jekyll
711
module Convertible
812
# Return the contents as a string

lib/jekyll/post.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,9 @@ def self.valid?(name)
1818
name =~ MATCHER
1919
end
2020

21-
attr_accessor :site, :date, :slug, :ext, :published, :data, :content, :output, :tags
22-
attr_writer :categories
23-
24-
def categories
25-
@categories ||= []
26-
end
21+
attr_accessor :site
22+
attr_accessor :data, :content, :output, :ext
23+
attr_accessor :date, :slug, :published, :tags, :categories
2724

2825
# Initialize this Post instance.
2926
# +site+ is the Site

test/test_post.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def do_render(post)
3636
end
3737

3838
should "keep date, title, and markup type" do
39+
@post.categories = []
3940
@post.process(@fake_file)
4041

4142
assert_equal Time.parse("2008-10-19"), @post.date

0 commit comments

Comments
 (0)