Sha256: c566bbbac74bc9424e47005f333dc54de7576277f514a9c9bc6410f04eef8564

Contents?: true

Size: 473 Bytes

Versions: 5

Compression:

Stored size: 473 Bytes

Contents

# typed: false
# frozen_string_literal: true

require './spec/spec_setup'
require 'lib/frontman/helpers/url_helper'

describe UrlHelper do
  subject do
    Class.new do
      include UrlHelper
    end.new
  end

  it 'should properly format a URL' do
    improperly_formatted = %w[hello-world/index.html /hello-world/index.html /hello-world hello-world/]

    improperly_formatted.each do |url|
      expect(subject.format_url(url)).to eq '/hello-world/'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
frontman-ssg-0.1.1 spec/frontman/helpers/url_helper_spec.rb
frontman-ssg-0.1.0 spec/frontman/helpers/url_helper_spec.rb
frontman-ssg-0.0.4 spec/frontman/helpers/url_helper_spec.rb
frontman-ssg-0.0.3 spec/frontman/helpers/url_helper_spec.rb
frontman-ssg-0.0.2 spec/frontman/helpers/url_helper_spec.rb