Sha256: 934533c702a93f0a2860309734ef5d1694ca2fd90ef00eecd9f1f9d352e50ff7
Contents?: true
Size: 690 Bytes
Versions: 18
Compression:
Stored size: 690 Bytes
Contents
module WithStatus extend ActiveSupport::Concern included do serialize :status, Mumuki::Laboratory::Status validates_presence_of :status end def passed? status.passed? end def aborted? status == :aborted end def run_update! running! begin update! yield rescue => e errored! e.message raise e end end def passed! update! status: :passed end def running! update! status: :running, result: nil, test_results: nil, expectation_results: [], manual_evaluation_comment: nil end def errored!(message) update! result: message, status: :errored end end
Version data entries
18 entries across 18 versions & 1 rubygems