Rename Upvote role to Votes
This commit is contained in:
parent
06c1a8a9ae
commit
a2a0060034
6 changed files with 5 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
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"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue