Sha256: 539c255c32bd16d6a78f1187dd359ed1ae08f8d8f90c167809397fae3984f594

Contents?: true

Size: 535 Bytes

Versions: 2

Compression:

Stored size: 535 Bytes

Contents

require 'spec_helper'

module Sparrow
  describe PathNormalizer, type: :unit do
    let(:clazz) do
      Class.new do
        include PathNormalizer
      end
    end

    subject { clazz.new }

    describe '.normalize_path' do
      it 'should remove any starting slash from the path string' do
        expect(subject.normalize_path('/panda')).to eq 'panda'
      end

      it 'should not touch any strings that do not start with a slash' do
        expect(subject.normalize_path('panda')).to eq 'panda'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cp-sparrow-0.0.12 spec/unit/path_normalizer_spec.rb
cp-sparrow-0.0.11 spec/unit/path_normalizer_spec.rb