lib/physical/spec_support/factories/box_factory.rb in physical-0.4.4 vs lib/physical/spec_support/factories/box_factory.rb in physical-0.4.5
- old
+ new
@@ -1,12 +1,10 @@
# 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) }
+ initialize_with { new(**attributes) }
end
end