Sha256: 1a652e68d588ef932b2c3ed27b7e3471f6acae88516b207956db109380438783

Contents?: true

Size: 732 Bytes

Versions: 18

Compression:

Stored size: 732 Bytes

Contents

# frozen_string_literal: true

#
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#

require 'spec_helper'

describe Dbee::Model::Constraints do
  CONSTRAINT_CONFIG = { name: :a }.freeze

  CONSTRAINT_FACTORIES = {
    Dbee::Model::Constraints::Reference => CONSTRAINT_CONFIG.merge(parent: :b, type: :reference),
    Dbee::Model::Constraints::Static => CONSTRAINT_CONFIG.merge(value: :b, type: :static)
  }.freeze

  CONSTRAINT_FACTORIES.each_pair do |constant, config|
    it "should instantiate #{constant} objects" do
      expect(described_class.make(config)).to be_a(constant)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
dbee-2.1.1 spec/dbee/model/constraints_spec.rb
dbee-2.1.0 spec/dbee/model/constraints_spec.rb
dbee-2.1.0.pre.alpha spec/dbee/model/constraints_spec.rb
dbee-2.0.3 spec/dbee/model/constraints_spec.rb
dbee-2.0.2 spec/dbee/model/constraints_spec.rb
dbee-2.0.1 spec/dbee/model/constraints_spec.rb
dbee-2.0.0 spec/dbee/model/constraints_spec.rb
dbee-2.0.0.pre.alpha spec/dbee/model/constraints_spec.rb
dbee-1.2.1 spec/dbee/model/constraints_spec.rb
dbee-1.2.0 spec/dbee/model/constraints_spec.rb
dbee-1.1.0 spec/dbee/model/constraints_spec.rb
dbee-1.0.3 spec/dbee/model/constraints_spec.rb
dbee-1.0.2 spec/dbee/model/constraints_spec.rb
dbee-1.0.1 spec/dbee/model/constraints_spec.rb
dbee-1.0.0 spec/dbee/model/constraints_spec.rb
dbee-1.0.0.pre.alpha.3 spec/dbee/model/constraints_spec.rb
dbee-1.0.0.pre.alpha.2 spec/dbee/model/constraints_spec.rb
dbee-1.0.0.pre.alpha.1 spec/dbee/model/constraints_spec.rb