Skip to content
Snippets Groups Projects
Commit 696a5fce authored by Gabriel Mazetto's avatar Gabriel Mazetto
Browse files

Refactor Rainbow usage in specs

We don't test any specific string generated by it yet, so there is no
point in keeping it enabled when we are disabling it everywhere we test its output.
parent 010fbedb
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Loading
Loading
@@ -10,9 +10,6 @@ describe Gitlab::BareRepositoryImport::Importer, :seed_helper do
subject(:importer) { described_class.new(admin, bare_repository) }
 
before do
@rainbow = Rainbow.enabled
Rainbow.enabled = false
allow(described_class).to receive(:log)
end
 
Loading
Loading
@@ -20,7 +17,6 @@ describe Gitlab::BareRepositoryImport::Importer, :seed_helper do
FileUtils.rm_rf(base_dir)
TestEnv.clean_test_path
ensure_seeds
Rainbow.enabled = @rainbow
end
 
shared_examples 'importing a repository' do
Loading
Loading
Loading
Loading
@@ -98,15 +98,6 @@ describe SystemCheck::SimpleExecutor do
end
end
 
before do
@rainbow = Rainbow.enabled
Rainbow.enabled = false
end
after do
Rainbow.enabled = @rainbow
end
describe '#component' do
it 'returns stored component name' do
expect(subject.component).to eq('Test')
Loading
Loading
Loading
Loading
@@ -29,6 +29,7 @@ end
 
# require rainbow gem String monkeypatch, so we can test SystemChecks
require 'rainbow/ext/string'
Rainbow.enabled = false
 
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment