Commit 36703445 authored by James Lopez's avatar James Lopez

Merge branch 'frozen_spec_helpers' into 'master'

Add frozen_string_literal to helper specs

See merge request gitlab-org/gitlab!17848
parents 33c2a94c 18048a60
......@@ -81,7 +81,7 @@ module SubmoduleHelper
end
def relative_self_links(relative_path, commit, project)
relative_path.rstrip!
relative_path = relative_path.rstrip
absolute_project_path = "/" + project.full_path
# Resolve `relative_path` to target path
......
# frozen_string_literal: true
require 'spec_helper'
describe ApplicationHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe AutoDevopsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe AvatarsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe AwardEmojiHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe BlameHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe BlobHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe BoardsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe BroadcastMessagesHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe ButtonHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe CalendarHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe CiStatusHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe CommitsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe ComponentsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe DashboardHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe DeferScriptTagHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe EmailsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe EventsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe ExploreHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe FormHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe GitHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe GitlabRoutingHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe GraphHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe HooksHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe IconsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe ImportHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe InstanceConfigurationHelper do
......
# frozen_string_literal: true
require "spec_helper"
describe IssuesHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe LabelsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe MarkupHelper do
......@@ -408,12 +410,12 @@ describe MarkupHelper do
it 'preserves a link href when link text is truncated' do
text = 'The quick brown fox jumped over the lazy dog' # 44 chars
input = "#{text}#{text}#{text} " # 133 chars
link_url = 'http://example.com/foo/bar/baz' # 30 chars
input << link_url
object = create_object(input)
input = "#{text}#{text}#{text} #{link_url}" # 163 chars
expected_link_text = 'http://example...</a>'
object = create_object(input)
expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(link_url)
expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(expected_link_text)
end
......
# frozen_string_literal: true
require 'spec_helper'
describe MembersHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe MilestonesHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe MilestonesRoutingHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe NamespacesHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe NavHelper, :do_not_mock_admin_mode do
......
# frozen_string_literal: true
require "spec_helper"
describe NotesHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe NotificationsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe PageLayoutHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe PaginationHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe PreferencesHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe ProfilesHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe RssHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe RunnersHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe SearchHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe SidekiqHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe SnippetsHelper do
......
# frozen_string_literal: true
require "spec_helper"
describe StorageHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe SubmoduleHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe TabHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe TimeHelper do
......
# frozen_string_literal: true
require "spec_helper"
describe TodosHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe TreeHelper do
......
# frozen_string_literal: true
require "spec_helper"
describe UserCalloutsHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe UsersHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe VersionCheckHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe VisibilityLevelHelper do
......
# frozen_string_literal: true
require 'spec_helper'
describe WikiHelper do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment