diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-17 14:59:07 +0300 |
commit | 8b573c94895dc0ac0e1d9d59cf3e8745e8b539ca (patch) | |
tree | 544930fb309b30317ae9797a9683768705d664c4 /spec/lib/bulk_imports/pipeline/attributes_spec.rb | |
parent | 4b1de649d0168371549608993deac953eb692019 (diff) |
Add latest changes from gitlab-org/gitlab@13-7-stable-eev13.7.0-rc42
Diffstat (limited to 'spec/lib/bulk_imports/pipeline/attributes_spec.rb')
-rw-r--r-- | spec/lib/bulk_imports/pipeline/attributes_spec.rb | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/spec/lib/bulk_imports/pipeline/attributes_spec.rb b/spec/lib/bulk_imports/pipeline/attributes_spec.rb deleted file mode 100644 index 54c5dbd4cae..00000000000 --- a/spec/lib/bulk_imports/pipeline/attributes_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe BulkImports::Pipeline::Attributes do - describe 'pipeline attributes' do - before do - stub_const('BulkImports::Extractor', Class.new) - stub_const('BulkImports::Transformer', Class.new) - stub_const('BulkImports::Loader', Class.new) - - klass = Class.new do - include BulkImports::Pipeline::Attributes - - extractor BulkImports::Extractor, { foo: :bar } - transformer BulkImports::Transformer, { foo: :bar } - loader BulkImports::Loader, { foo: :bar } - end - - stub_const('BulkImports::MyPipeline', klass) - end - - describe 'getters' do - it 'retrieves class attributes' do - expect(BulkImports::MyPipeline.extractors).to contain_exactly({ klass: BulkImports::Extractor, options: { foo: :bar } }) - expect(BulkImports::MyPipeline.transformers).to contain_exactly({ klass: BulkImports::Transformer, options: { foo: :bar } }) - expect(BulkImports::MyPipeline.loaders).to contain_exactly({ klass: BulkImports::Loader, options: { foo: :bar } }) - end - end - - describe 'setters' do - it 'sets class attributes' do - klass = Class.new - options = { test: :test } - - BulkImports::MyPipeline.extractor(klass, options) - BulkImports::MyPipeline.transformer(klass, options) - BulkImports::MyPipeline.loader(klass, options) - - expect(BulkImports::MyPipeline.extractors) - .to contain_exactly( - { klass: BulkImports::Extractor, options: { foo: :bar } }, - { klass: klass, options: options }) - - expect(BulkImports::MyPipeline.transformers) - .to contain_exactly( - { klass: BulkImports::Transformer, options: { foo: :bar } }, - { klass: klass, options: options }) - - expect(BulkImports::MyPipeline.loaders) - .to contain_exactly( - { klass: BulkImports::Loader, options: { foo: :bar } }, - { klass: klass, options: options }) - end - end - end -end |