spec/lib/protobuf/field/float_field_spec.rb in protobuf-3.7.0.pre2 vs spec/lib/protobuf/field/float_field_spec.rb in protobuf-3.7.0.pre3

- old
+ new

@@ -1,9 +1,13 @@ require 'spec_helper' RSpec.describe Protobuf::Field::FloatField do + it_behaves_like :packable_field, described_class do + let(:value) { [1.0, 2.0, 3.0] } + end + class SomeFloatMessage < ::Protobuf::Message optional :float, :some_float, 1 end let(:instance) { SomeFloatMessage.new } @@ -37,10 +41,10 @@ context 'when set with a non-numeric string' do let(:value) { "aaaa" } it 'throws an error' do - expect { subject }.to raise_error(ArgumentError) + expect { subject }.to raise_error(TypeError) end end context 'when set with something that is not a float' do let(:value) { [1, 2, 3] }