fix tests (involves changes to favorite set presenter)

This commit is contained in:
r888888888
2013-04-28 00:55:10 -07:00
parent d5f575159f
commit 5706a8e488

View File

@@ -1,13 +1,13 @@
module PostSetPresenters
class Favorite < Base
attr_accessor :favorite_set, :tag_set_presenter
delegate :favorites, :to => :favorite_set
attr_accessor :post_set, :tag_set_presenter
delegate :favorites, :to => :post_set
def initialize(favorite_set)
@favorite_set = favorite_set
def initialize(post_set)
@post_set = post_set
@tag_set_presenter = TagSetPresenter.new(
RelatedTagCalculator.calculate_from_sample_to_array(
favorite_set.tag_string
post_set.tag_string
).map {|x| x[0]}
)
end
@@ -17,7 +17,7 @@ module PostSetPresenters
end
def posts
@posts ||= favorite_set.posts
@posts ||= post_set.posts
end
end
end