Sha256: 6d87f1106b068f81e1f0ef5f5163b4bbfbc893a3f6f58b1030b70ccb63238ff4

Contents?: true

Size: 455 Bytes

Versions: 29

Compression:

Stored size: 455 Bytes

Contents

describe "Hash#each_value" do
  it "calls block once for each key, passing value" do
    r = []
    h = {:a => -5, :b => -3, :c => -2, :d => -1, :e => -1}
    h.each_value { |v| r << v }.should equal(h)
    r.should == [-5, -3, -2, -1, -1]
  end

  it "processes values in the same order as values()" do
    values = []
    h = {:a => -5, :b => -3, :c => -2, :d => -1, :e => -1}
    h.each_value { |v| values << v }
    values.should == h.values
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
opal-0.4.4 spec/rubyspec/core/hash/each_value_spec.rb
opal-0.4.3 spec/rubyspec/core/hash/each_value_spec.rb
opal-0.4.2 spec/rubyspec/core/hash/each_value_spec.rb
opal-0.4.1 spec/rubyspec/core/hash/each_value_spec.rb
opal-0.4.0 spec/rubyspec/core/hash/each_value_spec.rb
opal-0.3.44 spec/rubyspec/core/hash/each_value_spec.rb
opal-0.3.43 spec/rubyspec/core/hash/each_value_spec.rb
opal-0.3.42 spec/core/hash/each_value_spec.rb
opal-0.3.41 spec/core/hash/each_value_spec.rb
opal-0.3.40 spec/core/hash/each_value_spec.rb
opal-0.3.39 spec/core/hash/each_value_spec.rb
opal-0.3.38 spec/core/hash/each_value_spec.rb
opal-0.3.37 spec/core/hash/each_value_spec.rb
opal-0.3.36 spec/core/hash/each_value_spec.rb
opal-0.3.35 spec/core/hash/each_value_spec.rb
opal-0.3.34 spec/core/hash/each_value_spec.rb
opal-0.3.33 spec/core/hash/each_value_spec.rb
opal-0.3.32 spec/core/hash/each_value_spec.rb
opal-0.3.31 spec/core/hash/each_value_spec.rb
opal-0.3.30 spec/core/hash/each_value_spec.rb