Sha256: 665979416b0df1581a8542c17fc17bb7bcf28cc42de5d078f359062366e20647
Contents?: true
Size: 581 Bytes
Versions: 32
Compression:
Stored size: 581 Bytes
Contents
require 'spec_helper' describe Protobuf::EnumValue do subject { Test::EnumTestType::ONE } its(:class) { should eq(Fixnum) } its(:parent_class) { should eq(Test::EnumTestType) } its(:name) { should eq(:ONE) } its(:value) { should eq(1) } its(:to_hash_value) { should eq(1) } its(:to_s) { should eq("1") } its(:inspect) { should eq('#<Protobuf::EnumValue Test::EnumTestType::ONE=1>') } specify { subject.to_s(:name).should eq("ONE") } it "can be used as the index to an array" do array = [0, 1, 2, 3] array[::Test::EnumTestType::ONE].should eq(1) end end
Version data entries
32 entries across 32 versions & 1 rubygems