Sha256: 0bed3d04f689d383cad26cc09762fa5a47c1de735dd5e66d8b03565529d053ae

Contents?: true

Size: 555 Bytes

Versions: 10

Compression:

Stored size: 555 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

require 'hamster/set'

describe Hamster::Set do

  [:to_a, :entries].each do |method|

    describe "##{method}" do

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

        describe "on #{values.inspect}" do

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

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

        end

      end

    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hamster-0.2.1 spec/hamster/set/to_a_spec.rb
hamster-0.2.0 spec/hamster/set/to_a_spec.rb
hamster-0.1.23 spec/hamster/set/to_a_spec.rb
hamster-0.1.22 spec/hamster/set/to_a_spec.rb
hamster-0.1.21 spec/hamster/set/to_a_spec.rb
hamster-0.1.20 spec/hamster/set/to_a_spec.rb
hamster-0.1.19 spec/hamster/set/to_a_spec.rb
hamster-0.1.18 spec/hamster/set/to_a_spec.rb
hamster-0.1.17 spec/hamster/set/to_a_spec.rb
hamster-0.1.16 spec/hamster/set/to_a_spec.rb