Sha256: 436703b3c556db9d70426c4da14eb1dfec2b8fbac3f760e3ade4410b42c178da

Contents?: true

Size: 476 Bytes

Versions: 1

Compression:

Stored size: 476 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'creating a PB from a hash' do
  let(:ts_subobject) do
    Testing::Examples::Timestamp::SubTs.new(
      ts: Google::Protobuf::Timestamp.new(seconds: 10)
    )
  end

  it 'raises an error on unknown fields' do
    expect do
      Protobuf3Fixer.build_from_hash(
        Testing::Examples::Timestamp::SubTs,
        ts: { seconds: 10 }
      )
    end.to raise_error Google::Protobuf::ParseError
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hermes_messenger_of_the_gods-2.0.0 vendor/cache/Protobuf3Fixer-5f9f1a2d2da9/spec/build_from_hash_spec.rb