Sha256: d87ee1fe165051bd77cde7c945efa6404f5307f74486d96d5780b075875baf83

Contents?: true

Size: 572 Bytes

Versions: 12

Compression:

Stored size: 572 Bytes

Contents

require File.expand_path('../../../spec_helper', __FILE__)

require 'hamster/set'

describe Hamster::Set do

  [:empty?, :null?].each do |method|

    describe "##{method}" do

      [
        [[], true],
        [["A"], false],
        [["A", "B", "C"], false],
      ].each do |values, expected|

        describe "on #{values.inspect}" do

          before do
            @set = Hamster.set(*values)
          end

          it "returns #{expected.inspect}" do
            @set.send(method).should == expected
          end

        end

      end

    end

  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hamster-0.3.6 spec/hamster/set/empty_spec.rb
hamster-0.3.5 spec/hamster/set/empty_spec.rb
hamster-0.3.4 spec/hamster/set/empty_spec.rb
hamster-0.3.3 spec/hamster/set/empty_spec.rb
hamster-0.3.2 spec/hamster/set/empty_spec.rb
hamster-0.3.1 spec/hamster/set/empty_spec.rb
hamster-0.3.0 spec/hamster/set/empty_spec.rb
hamster-0.2.13 spec/hamster/set/empty_spec.rb
hamster-0.2.12 spec/hamster/set/empty_spec.rb
hamster-0.2.11 spec/hamster/set/empty_spec.rb
hamster-0.2.9 spec/hamster/set/empty_spec.rb
hamster-0.2.8 spec/hamster/set/empty_spec.rb