1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/tools/test_common.rb
Ryuta Kamizono 9e6f9bc773 Fix rubocop offence for Style/FrozenStringLiteralComment
```
% be rubocop -a
Inspecting 2777 files
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Offenses:

tools/test_common.rb:1:1: C: [Corrected] Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
if ENV["BUILDKITE"]
^

2777 files inspected, 1 offense detected, 1 offense corrected
```
2019-04-05 00:31:41 +09:00

17 lines
497 B
Ruby

# frozen_string_literal: true
if ENV["BUILDKITE"]
require "minitest/reporters"
require "fileutils"
module Minitest
def self.plugin_rails_ci_junit_format_test_report_for_buildkite_init(*)
dir = File.join(__dir__, "../test-reports/#{ENV['BUILDKITE_JOB_ID']}")
reporter << Minitest::Reporters::JUnitReporter.new(dir, false)
FileUtils.mkdir_p(dir)
end
end
Minitest.load_plugins
Minitest.extensions.unshift "rails_ci_junit_format_test_report_for_buildkite"
end