Sha256: aeb4c2f21360abb4ec5b919544aa53f9c55834ccf066a5016229491b61f3be89
Contents?: true
Size: 485 Bytes
Versions: 42
Compression:
Stored size: 485 Bytes
Contents
require 'spec_helper' describe Array do describe '#parse' do it 'should seperate a list of words into an array' do expect(Array.parse('just a test')).to eq(%w(just a test)) end it 'should preserve escaped whitespace' do expect(Array.parse('just a\ test')).to eq(['just', 'a test']) end it 'should match %w behavior with multiple backslashes' do str = 'just a\\ test' expect(Array.parse(str)).to eq(eval("%w(#{str})")) end end end
Version data entries
42 entries across 42 versions & 6 rubygems