Sha256: 3cee9dd5b15488900cf5cf8fa9a56f8c2ff1d8bc9dc07ef2583a523fd1d7bf7a

Contents?: true

Size: 364 Bytes

Versions: 5

Compression:

Stored size: 364 Bytes

Contents

# frozen_string_literal: true

require 'factory_bot'

FactoryBot.define do
  factory :physical_box, class: "Physical::Box" do
    dimensions { [20, 15, 30].map { |d| Measured::Length(d, :cm) } }
    inner_dimensions { dimensions.map { |d| d - Measured::Length(1, :cm) } }
    weight { Measured::Weight(0.1, :kg) }
    initialize_with { new(attributes) }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
physical-0.4.4 lib/physical/spec_support/factories/box_factory.rb
physical-0.4.3 lib/physical/spec_support/factories/box_factory.rb
physical-0.4.2 lib/physical/spec_support/factories/box_factory.rb
physical-0.4.1 lib/physical/spec_support/factories/box_factory.rb
physical-0.4.0 lib/physical/spec_support/factories/box_factory.rb