Sha256: 1b412ff8ba44b327a3b4a3cff03c650292023e650c0587168c8eff7d22afacfc

Contents?: true

Size: 533 Bytes

Versions: 9

Compression:

Stored size: 533 Bytes

Contents

require "render/extensions/symbolizable_array"

module Render
  module Extensions
    describe SymbolizableArray do
      describe "#initialize" do
        it "recursively casts Hashes as DottableHashes" do
          result = SymbolizableArray.new([{ "a" => :b }])
          result.first.should be_a(DottableHash)
        end

        it "recursively casts Arrays as SymbolizableArrays" do
          result = SymbolizableArray.new([[1]])
          result.first.should be_a(SymbolizableArray)
        end

      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
render-0.1.3 spec/unit/render/extensions/symbolizable_array_spec.rb
render-0.1.2 spec/unit/render/extensions/symbolizable_array_spec.rb
render-0.1.1 spec/unit/render/extensions/symbolizable_array_spec.rb
render-0.1.0 spec/unit/render/extensions/symbolizable_array_spec.rb
render-0.0.9 spec/unit/render/extensions/symbolizable_array_spec.rb
render-0.0.8 spec/unit/render/extensions/symbolizable_array_spec.rb
render-0.0.7 spec/unit/render/extensions/symbolizable_array_spec.rb
render-0.0.6 spec/unit/render/extensions/symbolizable_array_spec.rb
render-0.0.5 spec/unit/render/extensions/symbolizable_array_spec.rb