Sha256: 9c8ead8f2285404510c0c1abb979fdb283e32281f9576d2c7fb21fc4097bb9ce

Contents?: true

Size: 645 Bytes

Versions: 1

Compression:

Stored size: 645 Bytes

Contents

require 'spec_helper'
require 'lib/apache/hash'

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apache-config-generator-0.2.7 spec/apache/hash_spec.rb