Sha256: 5db564029ba48f41219a1c73b8e4237bd817aa9c31124876361b1ccf1f11fbbc

Contents?: true

Size: 414 Bytes

Versions: 5

Compression:

Stored size: 414 Bytes

Contents

class TestResult < ActiveRecord::Base

  belongs_to :test
  belongs_to :test_run
  belongs_to :error, class_name: "TestError"

  validates :test_id, :test_run_id, presence: true
  validates :status, inclusion: {in: %w{fail skip pass}}

  def self.insert_many(attributes)
    return if attributes.none?
    columns = attributes.first.keys
    values = attributes.map(&:values)
    import columns, values
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
houston-core-0.5.4 app/models/test_result.rb
houston-core-0.5.3 app/models/test_result.rb
houston-core-0.5.2 app/models/test_result.rb
houston-core-0.5.1 app/models/test_result.rb
houston-core-0.5.0 app/models/test_result.rb