Sha256: b045d8298d4c9aad1650cf57eb5e469bc6c2fd1d6c7d7b366b306c30a210d5a3

Contents?: true

Size: 563 Bytes

Versions: 5

Compression:

Stored size: 563 Bytes

Contents

require 'spec_helper'
require 'sugar-high/array'

describe "SugarHigh" do
  describe "Array ext" do
    describe '#to_symbols' do    
      it "should translate nested array of numbers and strings into symbols only array, excluding numbers" do
        [1, 'blip', [3, "hello"]].to_symbols.should == [:blip, :hello]
      end

      it "should translate nested array of numbers and strings into symbols only array, including numbers" do
        [1, 'blip', [3, "hello"]].to_symbols(:num).should == [:_1, :blip, :_3, :hello]        
      end
    end    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sugar-high-0.2.0 spec/sugar-high/array_spec.rb
sugar-high-0.1.8 spec/sugar-high/array_spec.rb
sugar-high-0.1.7 spec/sugar-high/array_spec.rb
sugar-high-0.1.6 spec/sugar-high/array_spec.rb
sugar-high-0.1.5 spec/sugar-high/array_spec.rb