Sha256: aa96bd65272989d95f93175cf65c315efe1e7470efa6e7712592263a951e2bc4

Contents?: true

Size: 538 Bytes

Versions: 1

Compression:

Stored size: 538 Bytes

Contents

require "spec_helper"

require "hamster/set"

describe Hamster::Set do

  describe "#clear" do

    [
      [],
      ["A"],
      %w[A B C],
    ].each do |values|

      describe "on #{values}" do

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

        it "preserves the original" do
          @original.should == Hamster.set(*values)
        end

        it "returns an empty set" do
          @result.should equal(Hamster.set)
        end

      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hamster-1.0.1.pre.rc.1 spec/hamster/set/clear_spec.rb