Sha256: 466ae26bdfa0c0642bf0243a575ae225f171ed5aba11edca16f97bcb5936eca1

Contents?: true

Size: 617 Bytes

Versions: 11

Compression:

Stored size: 617 Bytes

Contents

require 'spec_helper'

describe Array do

  describe "#remove_blanks" do
    it "to be this is a test" do
      expect("this    is   a  test".split(" ").remove_blanks).to eq(["this", "is", "a", "test"])
    end

    it "to be this is a test" do
      expect(["this", "", "that", nil].remove_blanks).to eq(["this", "that"])
    end
  end

  describe "#remove_first" do
    it "to be this is a test" do
      expect(["1", "2", "3"].remove_first).to eq(["2", "3"])
    end
  end

  describe "#remove_last" do
    it "to be this is a test" do
      expect(["1", "2", "3"].remove_last).to eq(["1", "2"])
    end
  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
nobiru-1.0.0 spec/lib/array_extension_spec.rb
nobiru-0.0.1 spec/lib/array_extension_spec.rb
flash_extensions-3.2.3 spec/lib/array_extension_spec.rb
flash_extensions-3.2.2 spec/lib/array_extension_spec.rb
flash_extensions-3.2.1 spec/lib/array_extension_spec.rb
flash_extensions-3.2.0 spec/lib/array_extension_spec.rb
flash_extensions-3.1.1 spec/lib/array_extension_spec.rb
flash_extensions-3.1.0 spec/lib/array_extension_spec.rb
flash_extensions-3.0.0 spec/lib/array_extension_spec.rb
flash_extensions-1.1.0 spec/lib/array_extension_spec.rb
flash_extensions-1.0.0 spec/lib/array_extension_spec.rb