Sha256: 0ca0120475b1b95badf85e17871e3a206739117895e8acaab6a90fc7803a2b00
Contents?: true
Size: 845 Bytes
Versions: 382
Compression:
Stored size: 845 Bytes
Contents
require "spec" require "../src/*" describe "Hamming" do describe "#compute" do it "computes no difference for identical single nucleotide strands" do Hamming.compute("A", "A").should eq 0 end pending "computes a distance for single nucleotide strands" do Hamming.compute("A", "G").should eq 1 end pending "computes a distance for small strands" do Hamming.compute("AG", "CT").should eq 2 end pending "computes a distance for medium strands" do Hamming.compute("GGACG", "GGTCG").should eq 1 end pending "computes a distance for large strands" do Hamming.compute("GGACGGATTCTG", "AGGACGGATTCT").should eq 9 end pending "raises an exception when strands aren't of equal length" do expect_raises(ArgumentError) { Hamming.compute("GCC", "A") } end end end
Version data entries
382 entries across 382 versions & 1 rubygems