summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/values_spec.rb
blob: 4ce2f3f5f0e752edd268694965fa96b82e2d07b3 (plain)
1
2
3
4
5
6
7
8
9
10
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../fixtures/classes', __FILE__)

describe "Hash#values" do
  it "returns an array of values" do
    h = { 1 => :a, 'a' => :a, 'the' => 'lang' }
    h.values.should be_kind_of(Array)
    h.values.sort {|a, b| a.to_s <=> b.to_s}.should == [:a, :a, 'lang']
  end
end