diff options
author | gfyoung <gfyoung17@gmail.com> | 2018-09-29 15:34:47 -0700 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2018-09-29 21:04:50 -0700 |
commit | 3836d69119fee2a625edae2a564132eff9520bc8 (patch) | |
tree | 826596df417b6620e626d3638c553a4f2402d3f2 /spec | |
parent | 227cc997fb107672e3293c56e0dcb1df72ad82d5 (diff) | |
download | gitlab-ce-3836d69119fee2a625edae2a564132eff9520bc8.tar.gz |
Enable frozen string in lib/api and lib/backup
Partially addresses #47424.
Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:
https://github.com/rspec/rspec-mocks/issues/1190
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/backup/manager_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/backup/repository_spec.rb | 4 |
2 files changed, 0 insertions, 8 deletions
diff --git a/spec/lib/backup/manager_spec.rb b/spec/lib/backup/manager_spec.rb index ca319679e80..9633caac788 100644 --- a/spec/lib/backup/manager_spec.rb +++ b/spec/lib/backup/manager_spec.rb @@ -11,10 +11,6 @@ describe Backup::Manager do allow(progress).to receive(:puts) allow(progress).to receive(:print) - allow_any_instance_of(String).to receive(:color) do |string, _color| - string - end - @old_progress = $progress # rubocop:disable Style/GlobalVars $progress = progress # rubocop:disable Style/GlobalVars end diff --git a/spec/lib/backup/repository_spec.rb b/spec/lib/backup/repository_spec.rb index c5a854b5660..fdeea814bb2 100644 --- a/spec/lib/backup/repository_spec.rb +++ b/spec/lib/backup/repository_spec.rb @@ -11,10 +11,6 @@ describe Backup::Repository do allow(FileUtils).to receive(:mkdir_p).and_return(true) allow(FileUtils).to receive(:mv).and_return(true) - allow_any_instance_of(String).to receive(:color) do |string, _color| - string - end - allow_any_instance_of(described_class).to receive(:progress).and_return(progress) end |