Commit a2a00600 authored by Riyad Preukschas's avatar Riyad Preukschas

Rename Upvote role to Votes

parent 06c1a8a9
class Issue < ActiveRecord::Base
include IssueCommonality
include Upvote
include Votes
acts_as_taggable_on :labels
......
......@@ -2,7 +2,7 @@ require File.join(Rails.root, "app/models/commit")
class MergeRequest < ActiveRecord::Base
include IssueCommonality
include Upvote
include Votes
BROKEN_DIFF = "--broken-diff"
......
module Upvote
module Votes
# Return the number of +1 comments (upvotes)
def upvotes
notes.select(&:upvote?).size
......
......@@ -12,7 +12,7 @@ describe Issue do
describe 'modules' do
it { should include_module(IssueCommonality) }
it { should include_module(Upvote) }
it { should include_module(Votes) }
end
subject { Factory.create(:issue) }
......
......@@ -8,6 +8,6 @@ describe MergeRequest do
describe 'modules' do
it { should include_module(IssueCommonality) }
it { should include_module(Upvote) }
it { should include_module(Votes) }
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment