Sha256: 5c6f0d04efd5fc7ccf37e1dd52ac1eb0c3b7de24f2fd255955dcf7ffdfa8e191

Contents?: true

Size: 516 Bytes

Versions: 21

Compression:

Stored size: 516 Bytes

Contents

describe Array do
  
  describe "#delete_switches" do
    it "should delete switches such as -h or --help, returning a new array" do
      ['foo', '-h', 'bar', '--help'].delete_switches.should == ['foo', 'bar']
    end
  end
  
  describe "#parse" do
    it "should seperate a list of words into an array" do
      Array.parse('just a test').should == ['just', 'a', 'test']
    end
    
    it "should preserve escaped whitespace" do
      Array.parse('just a\ test').should == ['just', 'a test']
    end
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
visionmedia-commander-3.0.0 spec/core_ext/array_spec.rb
visionmedia-commander-3.0.1 spec/core_ext/array_spec.rb
visionmedia-commander-3.0.2 spec/core_ext/array_spec.rb
visionmedia-commander-3.0.3 spec/core_ext/array_spec.rb
visionmedia-commander-3.1.0 spec/core_ext/array_spec.rb
visionmedia-commander-3.1.1 spec/core_ext/array_spec.rb
visionmedia-commander-3.1.2 spec/core_ext/array_spec.rb
visionmedia-commander-3.1.4 spec/core_ext/array_spec.rb
visionmedia-commander-3.1.5 spec/core_ext/array_spec.rb
visionmedia-commander-3.1.6 spec/core_ext/array_spec.rb
visionmedia-commander-3.1.7 spec/core_ext/array_spec.rb
visionmedia-commander-3.1.8 spec/core_ext/array_spec.rb
visionmedia-commander-3.2.0 spec/core_ext/array_spec.rb
visionmedia-commander-3.2.2 spec/core_ext/array_spec.rb
visionmedia-commander-3.2.3 spec/core_ext/array_spec.rb
visionmedia-commander-3.2.4 spec/core_ext/array_spec.rb
visionmedia-commander-3.2.5 spec/core_ext/array_spec.rb
visionmedia-commander-3.2.6 spec/core_ext/array_spec.rb
visionmedia-commander-3.2.7 spec/core_ext/array_spec.rb
visionmedia-commander-3.2.8 spec/core_ext/array_spec.rb