Skip to content

Commit

Permalink
removed accessor method and fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
krisb committed Jan 10, 2010
1 parent 93c029d commit ce228ac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions lib/jekyll/convertible.rb
Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions lib/jekyll/post.rb
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/test_post.rb
Expand Up @@ -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
Expand Down

0 comments on commit ce228ac

Please sign in to comment.