summaryrefslogtreecommitdiff
path: root/spec/ruby/core/hash/to_hash_spec.rb
blob: f479fa1fb284b05607b3620edeae500fff12ff21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require_relative '../../spec_helper'
require_relative 'fixtures/classes'

describe "Hash#to_hash" do
  it "returns self for Hash instances" do
    h = {}
    h.to_hash.should equal(h)
  end

  it "returns self for instances of subclasses of Hash" do
    h = HashSpecs::MyHash.new
    h.to_hash.should equal(h)
  end
end