Sha256: 58289bc43fa03a7940abc5636e54577a4c7ef4525b8102777f0aa15abcda0583

Contents?: true

Size: 786 Bytes

Versions: 30

Compression:

Stored size: 786 Bytes

Contents

require 'spec_helper'

require 'protobuf/code_generator'

describe 'protoc-gen-ruby' do
  let(:binpath) { ::File.expand_path('../../../bin/protoc-gen-ruby', __FILE__) }
  let(:request_bytes) { ::Google::Protobuf::Compiler::CodeGeneratorRequest.new(:file_to_generate => [ "test/foo.proto" ]) }
  let(:expected_file) { ::Google::Protobuf::Compiler::CodeGeneratorResponse::File.new(:name => 'test/foo.pb.rb') }
  let(:expected_response_bytes) { ::Google::Protobuf::Compiler::CodeGeneratorRequest.encode(:files => [ expected_file ]) }

  it 'reads the serialized request bytes and outputs serialized response bytes' do
    ::IO.popen(binpath, 'w+') do |pipe|
      pipe.write(request_bytes)
      pipe.read(expected_response_bytes.size).should eq expected_response_bytes
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
protobuffy-3.6.0 spec/bin/protoc-gen-ruby_spec.rb
protobuffy-3.5.1 spec/bin/protoc-gen-ruby_spec.rb
protobuffy-3.4.0 spec/bin/protoc-gen-ruby_spec.rb
protobuffy-3.3.0 spec/bin/protoc-gen-ruby_spec.rb
protobuffy-3.2.0 spec/bin/protoc-gen-ruby_spec.rb
protobuffy-3.1.0 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.2.0 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.1.0 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.0.5 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.0.4 spec/bin/protoc-gen-ruby_spec.rb
protobuf-2.8.13 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.0.3 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.0.2 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.0.1 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.0.0 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.0.0.rc2 spec/bin/protoc-gen-ruby_spec.rb
protobuf-3.0.0.rc1 spec/bin/protoc-gen-ruby_spec.rb
protobuf-2.8.12 spec/bin/protoc-gen-ruby_spec.rb
protobuf-2.8.11 spec/bin/protoc-gen-ruby_spec.rb
protobuf-2.8.10 spec/bin/protoc-gen-ruby_spec.rb