<commit_before>require 'spec_helper'
require 'ffi/msgpack/extensions/hash'

describe Hash do
  subject { {1 => 'a', 2 => 'b'} }

  it "should be packable" do
    should be_kind_of(FFI::MsgPack::Packable)
  end

  it "should pack to a msg" do
    pending "fix packing of Hashes" do
      subject.to_msgpack.should == "\x92\x01\x02"
    end
  end
end<commit_msg>Fixed the spec for Hash#to_msgpack.<commit_after>require 'spec_helper'
require 'ffi/msgpack/extensions/hash'

describe Hash do
  subject { {1 => 'a', 2 => 'b'} }

  it "should be packable" do
    should be_kind_of(FFI::MsgPack::Packable)
  end

  it "should pack to a msg" do
    subject.to_msgpack.should == "\x82\x01\xA1a\x02\xA1b"
  end
end
{'fraction_non_alphanumeric': 0.12802275960170698, 'fraction_numerical': 0.025604551920341393, 'mean_word_length': 3.6013071895424837, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6618560', 'n_tokens_mistral': 278, 'n_tokens_neox': 263, 'n_words': 72}