Commit 23bed91b authored by De Wet Blomerus's avatar De Wet Blomerus
Browse files

rename Statuseable to HasStatus

parent 0de40b20b390
module Ci
class Pipeline < ActiveRecord::Base
extend Ci::Model
include Statuseable
include HasStatus
self.table_name = 'ci_commits'
class CommitStatus < ActiveRecord::Base
include Statuseable
include HasStatus
include Importable
self.table_name = 'ci_builds'
module Statuseable
module HasStatus
extend ActiveSupport::Concern
AVAILABLE_STATUSES = %w[created pending running success failed canceled skipped]
......@@ -34,7 +34,7 @@ def process_stage(index)
def process_build(build, current_status)
return false unless Statuseable::COMPLETED_STATUSES.include?(current_status)
return false unless HasStatus::COMPLETED_STATUSES.include?(current_status)
if valid_statuses_for_when(build.when).include?(current_status)
require 'spec_helper'
describe Statuseable do
describe HasStatus do
before do
@object =
describe '.status' do
......@@ -12,7 +12,7 @@
subject { @object.status }
shared_examples 'build status summary' do
context 'all successful' do
let(:statuses) { { create(type, status: :success) } }
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