spec/mem_spec.rb in digest-murmurhash-0.1.0 vs spec/mem_spec.rb in digest-murmurhash-0.2.1

- old
+ new

@@ -1,12 +1,18 @@ require 'spec_helper' -describe Digest::MurmurHash do +describe MurmurHash do it "gc safe" do - murmur = Digest::MurmurHash.new - GC.start - murmur.update("murmur") - GC.start - expect(murmur.update("hash").to_s).to eq("c709abd5"); + { + MurmurHash1 => "c709abd5", + MurmurHash2 => "33f67c7e", + MurmurHash2A => "df25554b", + }.each do |c, should| + murmur = c.new + GC.start + murmur.update("murmur") + GC.start + expect(murmur.update("hash").to_s).to eq(should); + end end end