lib/physical/spec_support/factories/item_factory.rb in physical-0.4.4 vs lib/physical/spec_support/factories/item_factory.rb in physical-0.4.5

- old
+ new

@@ -1,11 +1,9 @@ # frozen_string_literal: true -require 'factory_bot' - FactoryBot.define do factory :physical_item, class: "Physical::Item" do - dimensions { [1, 2, 3].map { |d| Measured::Length(d, :cm)} } + dimensions { [1, 2, 3].map { |d| Measured::Length(d, :cm) } } weight { Measured::Weight(50, :g) } - initialize_with { new(attributes) } + initialize_with { new(**attributes) } end end