Sha256: 79d2cf86fa5ce9356b8bc666113f2de8771d88dfb0d37ebceb186385235c48ff
Contents?: true
Size: 862 Bytes
Versions: 12
Compression:
Stored size: 862 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require 'hamster/set' describe Hamster::Set do describe "#superset?" do [ [[], [], true], [["A"], [], true], [[], ["A"], false], [["A"], ["A"], true], [["A", "B", "C"], ["B"], true], [["B"], ["A", "B", "C"], false], [["A", "B", "C"], ["A", "C"], true], [["A", "C"], ["A", "B", "C"], false], [["A", "B", "C"], ["A", "B", "C"], true], [["A", "B", "C"], ["A", "B", "C", "D"], false], [["A", "B", "C", "D"], ["A", "B", "C"], true], ].each do |a, b, expected| describe "for #{a.inspect} and #{b.inspect}" do before do @result = Hamster.set(*a).superset?(Hamster.set(*b)) end it "returns #{expected}" do @result.should == expected end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems