From 790d8de5b6335f787ea9bcf533433431b61e7dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 8 Jan 2016 12:35:56 +0100 Subject: [PATCH] removes unused method --- app/models/comment.rb | 4 ---- spec/models/comment_spec.rb | 14 -------------- 2 files changed, 18 deletions(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index 44e16b729..3771af84a 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -90,10 +90,6 @@ class Comment < ActiveRecord::Base !root? end - def made_by?(user) - self.user == user - end - def call_after_commented self.commentable.try(:after_commented) end diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb index 684de6438..73b70fb42 100644 --- a/spec/models/comment_spec.rb +++ b/spec/models/comment_spec.rb @@ -129,18 +129,4 @@ describe Comment do end end - describe "#made_by?" do - let(:author) { create :user } - let(:comment) { create :comment, user: author } - - it "returns true if comment was made by user" do - expect(comment.made_by?(author)).to be true - end - - it "returns false if comment was not made by user" do - not_author = create :user - expect(comment.made_by?(not_author)).to be false - end - end - end