Sha256: feee500b72c7db67c33326d8ef31ac51f64365ea480369e6a578ff0193c5edfd

Contents?: true

Size: 695 Bytes

Versions: 1

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

require 'helper'

describe 'String#__nanoc_cleaned_identifier' do
  it 'should not convert already clean paths' do
    '/foo/bar/'.__nanoc_cleaned_identifier.must_equal '/foo/bar/'
  end

  it 'should prepend slash if necessary' do
    'foo/bar/'.__nanoc_cleaned_identifier.must_equal '/foo/bar/'
  end

  it 'should append slash if necessary' do
    '/foo/bar'.__nanoc_cleaned_identifier.must_equal '/foo/bar/'
  end

  it 'should remove double slashes at start' do
    '//foo/bar/'.__nanoc_cleaned_identifier.must_equal '/foo/bar/'
  end

  it 'should remove double slashes at end' do
    '/foo/bar//'.__nanoc_cleaned_identifier.must_equal '/foo/bar/'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nanoc-4.7.10 test/base/core_ext/string_spec.rb