Commit e479d7f9 authored by maeda's avatar maeda

Support frozen_string_literal in test/**/*.rb (#26561).

Contributed by Pavel Rosický.


git-svn-id: https://svn.redmine.org/redmine/trunk@17996 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 3b17a383
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# The Greeter class # The Greeter class
class Greeter class Greeter
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
...@@ -1432,7 +1432,7 @@ RAW ...@@ -1432,7 +1432,7 @@ RAW
end end
def test_parse_redmine_links_should_handle_a_tag_without_attributes def test_parse_redmine_links_should_handle_a_tag_without_attributes
text = '<a>http://example.com</a>' text = +'<a>http://example.com</a>'
expected = text.dup expected = text.dup
parse_redmine_links(text, nil, nil, nil, true, {}) parse_redmine_links(text, nil, nil, nil, true, {})
assert_equal expected, text assert_equal expected, text
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
module ObjectHelpers module ObjectHelpers
def User.generate!(attributes={}) def User.generate!(attributes={})
@generated_user_login ||= 'user0' @generated_user_login ||= +'user0'
@generated_user_login.succ! @generated_user_login.succ!
user = User.new(attributes) user = User.new(attributes)
user.login = @generated_user_login.dup if user.login.blank? user.login = @generated_user_login.dup if user.login.blank?
...@@ -21,7 +21,7 @@ module ObjectHelpers ...@@ -21,7 +21,7 @@ module ObjectHelpers
end end
def Group.generate!(attributes={}) def Group.generate!(attributes={})
@generated_group_name ||= 'Group 0' @generated_group_name ||= +'Group 0'
@generated_group_name.succ! @generated_group_name.succ!
group = Group.new(attributes) group = Group.new(attributes)
group.name = @generated_group_name.dup if group.name.blank? group.name = @generated_group_name.dup if group.name.blank?
...@@ -31,7 +31,7 @@ module ObjectHelpers ...@@ -31,7 +31,7 @@ module ObjectHelpers
end end
def Project.generate!(attributes={}) def Project.generate!(attributes={})
@generated_project_identifier ||= 'project-0000' @generated_project_identifier ||= +'project-0000'
@generated_project_identifier.succ! @generated_project_identifier.succ!
project = Project.new(attributes) project = Project.new(attributes)
project.name = @generated_project_identifier.dup if project.name.blank? project.name = @generated_project_identifier.dup if project.name.blank?
...@@ -53,7 +53,7 @@ module ObjectHelpers ...@@ -53,7 +53,7 @@ module ObjectHelpers
end end
def IssueStatus.generate!(attributes={}) def IssueStatus.generate!(attributes={})
@generated_status_name ||= 'Status 0' @generated_status_name ||= +'Status 0'
@generated_status_name.succ! @generated_status_name.succ!
status = IssueStatus.new(attributes) status = IssueStatus.new(attributes)
status.name = @generated_status_name.dup if status.name.blank? status.name = @generated_status_name.dup if status.name.blank?
...@@ -63,7 +63,7 @@ module ObjectHelpers ...@@ -63,7 +63,7 @@ module ObjectHelpers
end end
def Tracker.generate(attributes={}) def Tracker.generate(attributes={})
@generated_tracker_name ||= 'Tracker 0' @generated_tracker_name ||= +'Tracker 0'
@generated_tracker_name.succ! @generated_tracker_name.succ!
tracker = Tracker.new(attributes) tracker = Tracker.new(attributes)
tracker.name = @generated_tracker_name.dup if tracker.name.blank? tracker.name = @generated_tracker_name.dup if tracker.name.blank?
...@@ -79,7 +79,7 @@ module ObjectHelpers ...@@ -79,7 +79,7 @@ module ObjectHelpers
end end
def Role.generate!(attributes={}) def Role.generate!(attributes={})
@generated_role_name ||= 'Role 0' @generated_role_name ||= +'Role 0'
@generated_role_name.succ! @generated_role_name.succ!
role = Role.new(attributes) role = Role.new(attributes)
role.name = @generated_role_name.dup if role.name.blank? role.name = @generated_role_name.dup if role.name.blank?
...@@ -133,7 +133,7 @@ module ObjectHelpers ...@@ -133,7 +133,7 @@ module ObjectHelpers
end end
def Version.generate!(attributes={}) def Version.generate!(attributes={})
@generated_version_name ||= 'Version 0' @generated_version_name ||= +'Version 0'
@generated_version_name.succ! @generated_version_name.succ!
version = Version.new(attributes) version = Version.new(attributes)
version.name = @generated_version_name.dup if version.name.blank? version.name = @generated_version_name.dup if version.name.blank?
...@@ -162,7 +162,7 @@ module ObjectHelpers ...@@ -162,7 +162,7 @@ module ObjectHelpers
end end
def AuthSource.generate!(attributes={}) def AuthSource.generate!(attributes={})
@generated_auth_source_name ||= 'Auth 0' @generated_auth_source_name ||= +'Auth 0'
@generated_auth_source_name.succ! @generated_auth_source_name.succ!
source = AuthSource.new(attributes) source = AuthSource.new(attributes)
source.name = @generated_auth_source_name.dup if source.name.blank? source.name = @generated_auth_source_name.dup if source.name.blank?
...@@ -172,7 +172,7 @@ module ObjectHelpers ...@@ -172,7 +172,7 @@ module ObjectHelpers
end end
def Board.generate!(attributes={}) def Board.generate!(attributes={})
@generated_board_name ||= 'Forum 0' @generated_board_name ||= +'Forum 0'
@generated_board_name.succ! @generated_board_name.succ!
board = Board.new(attributes) board = Board.new(attributes)
board.name = @generated_board_name.dup if board.name.blank? board.name = @generated_board_name.dup if board.name.blank?
...@@ -183,7 +183,7 @@ module ObjectHelpers ...@@ -183,7 +183,7 @@ module ObjectHelpers
end end
def Attachment.generate!(attributes={}) def Attachment.generate!(attributes={})
@generated_filename ||= 'testfile0' @generated_filename ||= +'testfile0'
@generated_filename.succ! @generated_filename.succ!
attributes = attributes.dup attributes = attributes.dup
attachment = Attachment.new(attributes) attachment = Attachment.new(attributes)
...@@ -195,7 +195,7 @@ module ObjectHelpers ...@@ -195,7 +195,7 @@ module ObjectHelpers
end end
def CustomField.generate!(attributes={}) def CustomField.generate!(attributes={})
@generated_custom_field_name ||= 'Custom field 0' @generated_custom_field_name ||= +'Custom field 0'
@generated_custom_field_name.succ! @generated_custom_field_name.succ!
field = new(attributes) field = new(attributes)
field.name = @generated_custom_field_name.dup if field.name.blank? field.name = @generated_custom_field_name.dup if field.name.blank?
...@@ -213,7 +213,7 @@ module ObjectHelpers ...@@ -213,7 +213,7 @@ module ObjectHelpers
end end
def Changeset.generate!(attributes={}) def Changeset.generate!(attributes={})
@generated_changeset_rev ||= '123456' @generated_changeset_rev ||= +'123456'
@generated_changeset_rev.succ! @generated_changeset_rev.succ!
changeset = new(attributes) changeset = new(attributes)
changeset.repository ||= Project.find(1).repository changeset.repository ||= Project.find(1).repository
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
# frozen_string_literal: false # frozen_string_literal: true
# Redmine - project management software # Redmine - project management software
# Copyright (C) 2006-2017 Jean-Philippe Lang # Copyright (C) 2006-2017 Jean-Philippe Lang
......
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