lib/physical/spec_support/shared_examples.rb in physical-0.1.4 vs lib/physical/spec_support/shared_examples.rb in physical-0.2.0

- old
+ new

@@ -1,8 +1,16 @@ # frozen_string_literal: true RSpec.shared_examples 'a cuboid' do - let(:args) { {dimensions: [1.1, 2.2, 3.3].shuffle, dimension_unit: :cm} } + let(:args) do + { + dimensions: [ + Measured::Length.new(1.1, :cm), + Measured::Length.new(2.2, :cm), + Measured::Length.new(3.3, :cm) + ].shuffle + } + end it { is_expected.to be_a(Physical::Cuboid) } it "has dimensions as Measured::Length objects with rational values" do expect(subject.dimensions).to eq(