summaryrefslogtreecommitdiff
path: root/spec/controllers/import/import_spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/import/import_spec_helper.rb')
-rw-r--r--spec/controllers/import/import_spec_helper.rb33
1 files changed, 0 insertions, 33 deletions
diff --git a/spec/controllers/import/import_spec_helper.rb b/spec/controllers/import/import_spec_helper.rb
deleted file mode 100644
index 9d7648e25a7..00000000000
--- a/spec/controllers/import/import_spec_helper.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-require 'ostruct'
-
-# Helper methods for controller specs in the Import namespace
-#
-# Must be included manually.
-module ImportSpecHelper
- # Stub `controller` to return a null object double with the provided messages
- # when `client` is called
- #
- # Examples:
- #
- # stub_client(foo: %w(foo))
- #
- # controller.client.foo # => ["foo"]
- # controller.client.bar.baz.foo # => ["foo"]
- #
- # Returns the client double
- def stub_client(messages = {})
- client = double('client', messages).as_null_object
- allow(controller).to receive(:client).and_return(client)
-
- client
- end
-
- def stub_omniauth_provider(name)
- provider = OpenStruct.new(
- name: name,
- app_id: 'asd123',
- app_secret: 'asd123'
- )
- Gitlab.config.omniauth.providers << provider
- end
-end