apache-config-generator/spec/apache/hash_spec.rb
2011-09-27 15:30:38 -04:00

36 lines
619 B
Ruby

require 'spec_helper'
describe Hash do
describe '#to_sym_keys' do
subject { test_hash.to_sym_keys }
context 'no nested hashes' do
let(:test_hash) { {
'hello' => 'goodbye',
:other => 'this'
} }
it { should == {
:hello => 'goodbye',
:other => 'this'
} }
end
context 'nested hash' do
let(:test_hash) { {
'hello' => 'goodbye',
:other => {
'this' => 'that'
}
} }
it { should == {
:hello => 'goodbye',
:other => {
:this => 'that'
}
} }
end
end
end