Sha256: 51b805dd082b50907995b9a2e931872d374501185ed6a24603eda96351a1beeb

Contents?: true

Size: 567 Bytes

Versions: 6

Compression:

Stored size: 567 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

6 entries across 6 versions & 1 rubygems

Version Path
sugar-high-0.2.7 spec/sugar-high/array_spec.rb
sugar-high-0.2.6 spec/sugar-high/array_spec.rb
sugar-high-0.2.5 spec/sugar-high/array_spec.rb
sugar-high-0.2.4 spec/sugar-high/array_spec.rb
sugar-high-0.2.2 spec/sugar-high/array_spec.rb
sugar-high-0.2.1 spec/sugar-high/array_spec.rb