Commit 16eec80d authored by Thong Kuah's avatar Thong Kuah

Merge branch 'frozen-string-enable-spec-lib-gitlab-ci' into 'master'

Enable frozen string for spec/lib/gitlab/ci

See merge request gitlab-org/gitlab!19857
parents f728c0d6 3e5112c6
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Ci::Build::Rules::Rule do describe Gitlab::Ci::Build::Rules::Rule do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Ci::Build::Rules do describe Gitlab::Ci::Build::Rules do
......
# frozen_string_literal: true
require 'fast_spec_helper' require 'fast_spec_helper'
require 'gitlab_chronic_duration' require 'gitlab_chronic_duration'
require 'support/helpers/stub_feature_flags' require 'support/helpers/stub_feature_flags'
......
# frozen_string_literal: true
require 'fast_spec_helper' require 'fast_spec_helper'
require 'support/helpers/stub_feature_flags' require 'support/helpers/stub_feature_flags'
require_dependency 'active_model' require_dependency 'active_model'
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Ci::Status::Composite do describe Gitlab::Ci::Status::Composite do
......
# frozen_string_literal: true
require 'spec_helper' require 'spec_helper'
describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
...@@ -100,7 +102,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do ...@@ -100,7 +102,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
describe '#append' do describe '#append' do
shared_examples_for 'appends' do shared_examples_for 'appends' do
it "truncates and append content" do it "truncates and append content" do
stream.append("89", 4) stream.append(+"89", 4)
stream.seek(0) stream.seek(0)
expect(stream.size).to eq(6) expect(stream.size).to eq(6)
...@@ -108,7 +110,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do ...@@ -108,7 +110,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
end end
it 'appends in binary mode' do it 'appends in binary mode' do
'😺'.force_encoding('ASCII-8BIT').each_char.with_index do |byte, offset| (+'😺').force_encoding('ASCII-8BIT').each_char.with_index do |byte, offset|
stream.append(byte, offset) stream.append(byte, offset)
end end
...@@ -154,7 +156,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do ...@@ -154,7 +156,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
describe '#set' do describe '#set' do
shared_examples_for 'sets' do shared_examples_for 'sets' do
before do before do
stream.set("8901") stream.set(+"8901")
end end
it "overwrite content" do it "overwrite content" do
...@@ -168,7 +170,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do ...@@ -168,7 +170,7 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do
context 'when stream is StringIO' do context 'when stream is StringIO' do
let(:stream) do let(:stream) do
described_class.new do described_class.new do
StringIO.new("12345678") StringIO.new(+"12345678")
end end
end end
......
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