diff --git a/app/controllers/ci/application_controller.rb b/app/controllers/ci/application_controller.rb
index 726781cb30bbcccc6d505fdff3c02e65422a4b17..95390d09737ce0582ffcdcf75c82fe9d5c04b7f7 100644
--- a/app/controllers/ci/application_controller.rb
+++ b/app/controllers/ci/application_controller.rb
@@ -8,7 +8,7 @@ module Ci
 
     rescue_from Ci::Network::UnauthorizedError, with: :invalid_token
     before_filter :default_headers
-    before_filter :check_config
+    #before_filter :check_config
 
     protect_from_forgery
 
diff --git a/db/schema.rb b/db/schema.rb
index 77ced9caa3c4136546839acda1681834a741cc62..d7197d951a49bc54e9cd509f2631030adaca854f 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -24,17 +24,6 @@ ActiveRecord::Schema.define(version: 20150826001931) do
     t.datetime "updated_at"
   end
 
-  create_table "appearances", force: true do |t|
-    t.string   "title"
-    t.text     "description"
-    t.string   "logo"
-    t.integer  "updated_by"
-    t.datetime "created_at"
-    t.datetime "updated_at"
-    t.string   "dark_logo"
-    t.string   "light_logo"
-  end
-
   create_table "application_settings", force: true do |t|
     t.integer  "default_projects_limit"
     t.boolean  "signup_enabled"
@@ -46,11 +35,10 @@ ActiveRecord::Schema.define(version: 20150826001931) do
     t.string   "home_page_url"
     t.integer  "default_branch_protection",    default: 2
     t.boolean  "twitter_sharing_enabled",      default: true
-    t.text     "help_text"
     t.text     "restricted_visibility_levels"
+    t.boolean  "version_check_enabled",        default: true
     t.integer  "max_attachment_size",          default: 10,    null: false
     t.integer  "default_project_visibility"
-    t.boolean  "version_check_enabled",        default: true
     t.integer  "default_snippet_visibility"
     t.text     "restricted_signup_domains"
     t.boolean  "user_oauth_applications",      default: true
@@ -318,28 +306,6 @@ ActiveRecord::Schema.define(version: 20150826001931) do
 
   add_index "forked_project_links", ["forked_to_project_id"], name: "index_forked_project_links_on_forked_to_project_id", unique: true, using: :btree
 
-  create_table "git_hooks", force: true do |t|
-    t.string   "force_push_regex"
-    t.string   "delete_branch_regex"
-    t.string   "commit_message_regex"
-    t.boolean  "deny_delete_tag"
-    t.integer  "project_id"
-    t.datetime "created_at"
-    t.datetime "updated_at"
-    t.string   "author_email_regex"
-    t.boolean  "member_check",         default: false, null: false
-    t.string   "file_name_regex"
-    t.boolean  "is_sample",            default: false
-    t.integer  "max_file_size",        default: 0
-  end
-
-  create_table "historical_data", force: true do |t|
-    t.date     "date",              null: false
-    t.integer  "active_user_count"
-    t.datetime "created_at"
-    t.datetime "updated_at"
-  end
-
   create_table "identities", force: true do |t|
     t.string   "extern_uid"
     t.string   "provider"
@@ -411,21 +377,6 @@ ActiveRecord::Schema.define(version: 20150826001931) do
 
   add_index "labels", ["project_id"], name: "index_labels_on_project_id", using: :btree
 
-  create_table "ldap_group_links", force: true do |t|
-    t.string   "cn",           null: false
-    t.integer  "group_access", null: false
-    t.integer  "group_id",     null: false
-    t.datetime "created_at"
-    t.datetime "updated_at"
-    t.string   "provider"
-  end
-
-  create_table "licenses", force: true do |t|
-    t.text     "data",       null: false
-    t.datetime "created_at"
-    t.datetime "updated_at"
-  end
-
   create_table "members", force: true do |t|
     t.integer  "access_level",       null: false
     t.integer  "source_id",          null: false
@@ -507,19 +458,18 @@ ActiveRecord::Schema.define(version: 20150826001931) do
   add_index "milestones", ["project_id"], name: "index_milestones_on_project_id", using: :btree
 
   create_table "namespaces", force: true do |t|
-    t.string   "name",                            null: false
-    t.string   "path",                            null: false
+    t.string   "name",                     null: false
+    t.string   "path",                     null: false
     t.integer  "owner_id"
     t.datetime "created_at"
     t.datetime "updated_at"
     t.string   "type"
-    t.string   "description",     default: "",    null: false
+    t.string   "description", default: "", null: false
     t.string   "avatar"
-    t.boolean  "membership_lock", default: false
   end
 
   add_index "namespaces", ["created_at", "id"], name: "index_namespaces_on_created_at_and_id", using: :btree
-  add_index "namespaces", ["name"], name: "index_namespaces_on_name", using: :btree
+  add_index "namespaces", ["name"], name: "index_namespaces_on_name", unique: true, using: :btree
   add_index "namespaces", ["owner_id"], name: "index_namespaces_on_owner_id", using: :btree
   add_index "namespaces", ["path"], name: "index_namespaces_on_path", unique: true, using: :btree
   add_index "namespaces", ["type"], name: "index_namespaces_on_type", using: :btree
@@ -593,14 +543,6 @@ ActiveRecord::Schema.define(version: 20150826001931) do
   add_index "oauth_applications", ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree
   add_index "oauth_applications", ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree
 
-  create_table "project_group_links", force: true do |t|
-    t.integer  "project_id",                null: false
-    t.integer  "group_id",                  null: false
-    t.datetime "created_at"
-    t.datetime "updated_at"
-    t.integer  "group_access", default: 30, null: false
-  end
-
   create_table "project_import_data", force: true do |t|
     t.integer "project_id"
     t.text    "data"
@@ -613,28 +555,25 @@ ActiveRecord::Schema.define(version: 20150826001931) do
     t.datetime "created_at"
     t.datetime "updated_at"
     t.integer  "creator_id"
-    t.boolean  "issues_enabled",                default: true,     null: false
-    t.boolean  "wall_enabled",                  default: true,     null: false
-    t.boolean  "merge_requests_enabled",        default: true,     null: false
-    t.boolean  "wiki_enabled",                  default: true,     null: false
+    t.boolean  "issues_enabled",         default: true,     null: false
+    t.boolean  "wall_enabled",           default: true,     null: false
+    t.boolean  "merge_requests_enabled", default: true,     null: false
+    t.boolean  "wiki_enabled",           default: true,     null: false
     t.integer  "namespace_id"
-    t.string   "issues_tracker",                default: "gitlab", null: false
+    t.string   "issues_tracker",         default: "gitlab", null: false
     t.string   "issues_tracker_id"
-    t.boolean  "snippets_enabled",              default: true,     null: false
+    t.boolean  "snippets_enabled",       default: true,     null: false
     t.datetime "last_activity_at"
     t.string   "import_url"
-    t.integer  "visibility_level",              default: 0,        null: false
-    t.boolean  "archived",                      default: false,    null: false
+    t.integer  "visibility_level",       default: 0,        null: false
+    t.boolean  "archived",               default: false,    null: false
     t.string   "avatar"
     t.string   "import_status"
-    t.float    "repository_size",               default: 0.0
-    t.integer  "star_count",                    default: 0,        null: false
+    t.float    "repository_size",        default: 0.0
+    t.integer  "star_count",             default: 0,        null: false
     t.string   "import_type"
     t.string   "import_source"
-    t.text     "merge_requests_template"
-    t.boolean  "merge_requests_rebase_enabled", default: false
-    t.boolean  "merge_requests_rebase_default", default: true
-    t.integer  "commit_count",                  default: 0
+    t.integer  "commit_count",           default: 0
   end
 
   add_index "projects", ["created_at", "id"], name: "index_projects_on_created_at_and_id", using: :btree
@@ -734,19 +673,13 @@ ActiveRecord::Schema.define(version: 20150826001931) do
 
   add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
 
-  create_table "test", id: false, force: true do |t|
-    t.integer "col"
-  end
-
-  add_index "test", ["col"], name: "index_name", unique: true, using: :btree
-
   create_table "users", force: true do |t|
-    t.string   "email",                       default: "",    null: false
-    t.string   "encrypted_password",          default: "",    null: false
+    t.string   "email",                      default: "",    null: false
+    t.string   "encrypted_password",         default: "",    null: false
     t.string   "reset_password_token"
     t.datetime "reset_password_sent_at"
     t.datetime "remember_created_at"
-    t.integer  "sign_in_count",               default: 0
+    t.integer  "sign_in_count",              default: 0
     t.datetime "current_sign_in_at"
     t.datetime "last_sign_in_at"
     t.string   "current_sign_in_ip"
@@ -754,22 +687,22 @@ ActiveRecord::Schema.define(version: 20150826001931) do
     t.datetime "created_at"
     t.datetime "updated_at"
     t.string   "name"
-    t.boolean  "admin",                       default: false, null: false
-    t.integer  "projects_limit",              default: 10
-    t.string   "skype",                       default: "",    null: false
-    t.string   "linkedin",                    default: "",    null: false
-    t.string   "twitter",                     default: "",    null: false
+    t.boolean  "admin",                      default: false, null: false
+    t.integer  "projects_limit",             default: 10
+    t.string   "skype",                      default: "",    null: false
+    t.string   "linkedin",                   default: "",    null: false
+    t.string   "twitter",                    default: "",    null: false
     t.string   "authentication_token"
-    t.integer  "theme_id",                    default: 1,     null: false
+    t.integer  "theme_id",                   default: 1,     null: false
     t.string   "bio"
-    t.integer  "failed_attempts",             default: 0
+    t.integer  "failed_attempts",            default: 0
     t.datetime "locked_at"
     t.string   "username"
-    t.boolean  "can_create_group",            default: true,  null: false
-    t.boolean  "can_create_team",             default: true,  null: false
+    t.boolean  "can_create_group",           default: true,  null: false
+    t.boolean  "can_create_team",            default: true,  null: false
     t.string   "state"
-    t.integer  "color_scheme_id",             default: 1,     null: false
-    t.integer  "notification_level",          default: 1,     null: false
+    t.integer  "color_scheme_id",            default: 1,     null: false
+    t.integer  "notification_level",         default: 1,     null: false
     t.datetime "password_expires_at"
     t.integer  "created_by_id"
     t.datetime "last_credential_check_at"
@@ -778,21 +711,20 @@ ActiveRecord::Schema.define(version: 20150826001931) do
     t.datetime "confirmed_at"
     t.datetime "confirmation_sent_at"
     t.string   "unconfirmed_email"
-    t.boolean  "hide_no_ssh_key",             default: false
-    t.string   "website_url",                 default: "",    null: false
+    t.boolean  "hide_no_ssh_key",            default: false
+    t.string   "website_url",                default: "",    null: false
     t.string   "notification_email"
-    t.boolean  "hide_no_password",            default: false
-    t.boolean  "password_automatically_set",  default: false
-    t.datetime "admin_email_unsubscribed_at"
+    t.boolean  "hide_no_password",           default: false
+    t.boolean  "password_automatically_set", default: false
     t.string   "location"
-    t.string   "public_email",                default: "",    null: false
     t.string   "encrypted_otp_secret"
     t.string   "encrypted_otp_secret_iv"
     t.string   "encrypted_otp_secret_salt"
-    t.boolean  "otp_required_for_login",      default: false, null: false
+    t.boolean  "otp_required_for_login",     default: false, null: false
     t.text     "otp_backup_codes"
-    t.integer  "dashboard",                   default: 0
-    t.integer  "project_view",                default: 0
+    t.string   "public_email",               default: "",    null: false
+    t.integer  "dashboard",                  default: 0
+    t.integer  "project_view",               default: 0
   end
 
   add_index "users", ["admin"], name: "index_users_on_admin", using: :btree
diff --git a/spec/ci/factories/users.rb b/spec/ci/factories/users.rb
deleted file mode 100644
index 26b30eff0e6fb534ce1d4f4999c91766f3addaf5..0000000000000000000000000000000000000000
--- a/spec/ci/factories/users.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-# Read about factories at https://github.com/thoughtbot/factory_girl
-
-FactoryGirl.define do
-  factory :user do
-  end
-end
diff --git a/spec/ci/spec_helper.rb b/spec/ci/spec_helper.rb
deleted file mode 100644
index 54d3068845d400144ac548726c41fe6380e8e372..0000000000000000000000000000000000000000
--- a/spec/ci/spec_helper.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-if ENV['SIMPLECOV']
-  require 'simplecov'
-  SimpleCov.start
-end
-
-if ENV['COVERALLS']
-  require 'coveralls'
-  Coveralls.wear!('rails')
-end
-
-ENV["RAILS_ENV"] ||= 'test'
-require File.expand_path("../../config/environment", __FILE__)
-require 'rspec/rails'
-require 'rspec/autorun'
-require 'sidekiq/testing/inline'
-require 'capybara/poltergeist'
-
-Capybara.javascript_driver = :poltergeist
-Capybara.default_wait_time = 10
-
-# Requires supporting ruby files with custom matchers and macros, etc,
-# in spec/support/ and its subdirectories.
-Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
-
-require 'webmock/rspec'
-WebMock.disable_net_connect!(allow_localhost: true)
-
-RSpec.configure do |config|
-  config.include LoginHelpers, type: :feature
-
-  config.include StubGitlabCalls
-  config.include StubGitlabData
-
-  # ## Mock Framework
-  #
-  # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
-  #
-  # config.mock_with :mocha
-  # config.mock_with :flexmock
-  # config.mock_with :rr
-
-  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
-  config.fixture_path = "#{::Rails.root}/spec/fixtures"
-
-  # If you're not using ActiveRecord, or you'd prefer not to run each of your
-  # examples within a transaction, remove the following line or assign false
-  # instead of true.
-  config.use_transactional_fixtures = false
-
-  # If true, the base class of anonymous controllers will be inferred
-  # automatically. This will be the default behavior in future versions of
-  # rspec-rails.
-  config.infer_base_class_for_anonymous_controllers = false
-
-  # Run specs in random order to surface order dependencies. If you find an
-  # order dependency and want to debug it, you can fix the order by providing
-  # the seed, which is printed after each run.
-  #     --seed 1234
-  config.order = "random"
-end
diff --git a/spec/ci/support/api_helpers.rb b/spec/ci/support/api_helpers.rb
deleted file mode 100644
index 555980f2ea7d1ad26da5cb9e328c18ac3084d521..0000000000000000000000000000000000000000
--- a/spec/ci/support/api_helpers.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-module ApiHelpers
-  # Public: Prepend a request path with the path to the API
-  #
-  # path - Path to append
-  # user - User object - If provided, automatically appends private_token query
-  #          string for authenticated requests
-  #
-  # Examples
-  #
-  #   >> api('/issues')
-  #   => "/api/v2/issues"
-  #
-  #   >> api('/issues', User.last)
-  #   => "/api/v2/issues?private_token=..."
-  #
-  #   >> api('/issues?foo=bar', User.last)
-  #   => "/api/v2/issues?foo=bar&private_token=..."
-  #
-  # Returns the relative path to the requested API resource
-  def api(path, user = nil)
-    "/api/#{API::API.version}#{path}" +
-
-      # Normalize query string
-      (path.index('?') ? '' : '?') +
-
-      # Append private_token if given a User object
-      (user.respond_to?(:private_token) ?
-        "&private_token=#{user.private_token}" : "")
-  end
-
-  def json_response
-    JSON.parse(response.body)
-  end
-  
-end
diff --git a/spec/ci/support/db_cleaner.rb b/spec/ci/support/db_cleaner.rb
deleted file mode 100644
index d2d532d9738ad13def8132d23b0ec37497ad7253..0000000000000000000000000000000000000000
--- a/spec/ci/support/db_cleaner.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-# RSpec.configure do |config|
-
-#   config.around(:each) do |example|
-#     DatabaseCleaner.strategy = :transaction
-#     DatabaseCleaner.clean_with(:truncation)
-#     DatabaseCleaner.cleaning do
-#       example.run
-#     end
-#   end
-
-#   config.around(:each, js: true) do |example|
-#     DatabaseCleaner.strategy = :truncation
-#     DatabaseCleaner.clean_with(:truncation)
-#     DatabaseCleaner.cleaning do
-#       example.run
-#     end
-#   end
-# end
-RSpec.configure do |config|
-  config.before(:suite) do
-    DatabaseCleaner.clean_with(:truncation)
-  end
-
-  config.before(:each) do
-    DatabaseCleaner.strategy = :transaction
-  end
-
-  config.before(:each, :js => true) do
-    DatabaseCleaner.strategy = :truncation
-  end
-
-  config.before(:each) do
-    DatabaseCleaner.start
-  end
-
-  config.after(:each) do
-    DatabaseCleaner.clean
-  end
-end
diff --git a/spec/ci/support/login_helpers.rb b/spec/ci/support/login_helpers.rb
deleted file mode 100644
index ebd9693f8a4a01c5438b814660a3240687190317..0000000000000000000000000000000000000000
--- a/spec/ci/support/login_helpers.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-module LoginHelpers
-  def login_as(role)
-    raise 'Only :user allowed' unless role == :user
-    stub_gitlab_calls
-    login_with(:user)
-  end
-
-  # Internal: Login as the specified user
-  #
-  # user - User instance to login with
-  def login_with(user)
-    visit callback_user_sessions_path(code: "some_auth_code_here")
-  end
-
-  def logout
-    click_link "Logout" rescue nil
-  end
-
-  def skip_admin_auth
-    ApplicationController.any_instance.stub(authenticate_admin!: true)
-  end
-end
diff --git a/spec/ci/support/monkey_patches/oauth2.rb b/spec/ci/support/monkey_patches/oauth2.rb
deleted file mode 100644
index dfd5e319f00c38acd4a97f1b5ddb08b9aa51f75f..0000000000000000000000000000000000000000
--- a/spec/ci/support/monkey_patches/oauth2.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-module OAuth2
-  class Client
-    def get_token(params, access_token_opts = {}, access_token_class = AccessToken)
-      OpenStruct.new(token: "some_token")
-    end
-  end
-end
\ No newline at end of file
diff --git a/spec/ci/controllers/commits_controller_spec.rb b/spec/controllers/ci/commits_controller_spec.rb
similarity index 74%
rename from spec/ci/controllers/commits_controller_spec.rb
rename to spec/controllers/ci/commits_controller_spec.rb
index f32d6f8c126e88ac31be25fe5ce207f022c8f587..b71e7505731241b109e4215e1a7a252a21f8c55f 100644
--- a/spec/ci/controllers/commits_controller_spec.rb
+++ b/spec/controllers/ci/commits_controller_spec.rb
@@ -1,13 +1,13 @@
 require "spec_helper"
 
-describe CommitsController do
+describe Ci::CommitsController do
   before do
-    @project = FactoryGirl.create :project
+    @project = FactoryGirl.create :ci_project
   end
 
   describe "GET /status" do
     it "returns status of commit" do
-      commit = FactoryGirl.create :commit, project: @project
+      commit = FactoryGirl.create :ci_commit, project: @project
       get :status, id: commit.sha, ref_id: commit.ref, project_id: @project.id
 
       expect(response).to be_success
@@ -16,7 +16,7 @@ describe CommitsController do
     end
 
     it "returns not_found status" do
-      commit = FactoryGirl.create :commit, project: @project
+      commit = FactoryGirl.create :ci_commit, project: @project
       get :status, id: commit.sha, ref_id: "deploy", project_id: @project.id
 
       expect(response).to be_success
diff --git a/spec/ci/controllers/projects_controller_spec.rb b/spec/controllers/ci/projects_controller_spec.rb
similarity index 100%
rename from spec/ci/controllers/projects_controller_spec.rb
rename to spec/controllers/ci/projects_controller_spec.rb
diff --git a/spec/ci/factories/builds.rb b/spec/factories/ci/builds.rb
similarity index 96%
rename from spec/ci/factories/builds.rb
rename to spec/factories/ci/builds.rb
index 346e0002bf51a62c9886ca2ef9b789206464faff..35a84b1e6ebbc3f177690118e3046a8d513de32a 100644
--- a/spec/ci/factories/builds.rb
+++ b/spec/factories/ci/builds.rb
@@ -26,7 +26,7 @@
 # Read about factories at https://github.com/thoughtbot/factory_girl
 
 FactoryGirl.define do
-  factory :build do
+  factory :ci_build, class: Ci::Build do
     started_at 'Di 29. Okt 09:51:28 CET 2013'
     finished_at 'Di 29. Okt 09:53:28 CET 2013'
     commands 'ls -a'
diff --git a/spec/ci/factories/commits.rb b/spec/factories/ci/commits.rb
similarity index 92%
rename from spec/ci/factories/commits.rb
rename to spec/factories/ci/commits.rb
index 6fdd46fa74be221c92fb96e00f266d9bd094105b..c1d42b607c33f4a14bf151a3406406e343e2aaf6 100644
--- a/spec/ci/factories/commits.rb
+++ b/spec/factories/ci/commits.rb
@@ -17,7 +17,7 @@
 
 # Read about factories at https://github.com/thoughtbot/factory_girl
 FactoryGirl.define do
-  factory :commit do
+  factory :ci_commit, class: Ci::Commit do
     ref 'master'
     before_sha '76de212e80737a608d939f648d959671fb0a0142'
     sha '97de212e80737a608d939f648d959671fb0a0142'
@@ -51,21 +51,21 @@ FactoryGirl.define do
       }
     end
 
-    factory :commit_without_jobs do
+    factory :ci_commit_without_jobs do
       after(:create) do |commit, evaluator|
         commit.push_data[:ci_yaml_file] = YAML.dump({})
         commit.save
       end
     end
 
-    factory :commit_with_one_job do
+    factory :ci_commit_with_one_job do
       after(:create) do |commit, evaluator|
         commit.push_data[:ci_yaml_file] = YAML.dump({rspec: { script: "ls" }})
         commit.save
       end
     end
 
-    factory :commit_with_two_jobs do
+    factory :ci_commit_with_two_jobs do
       after(:create) do |commit, evaluator|
         commit.push_data[:ci_yaml_file] = YAML.dump({rspec: { script: "ls" }, spinach: { script: "ls" }})
         commit.save
diff --git a/spec/ci/factories/events.rb b/spec/factories/ci/events.rb
similarity index 91%
rename from spec/ci/factories/events.rb
rename to spec/factories/ci/events.rb
index 1dfa52e3529eb7326ffe8e677958700603ebac41..0345075159611f0b6a56725a4b1f2a77e2cebc31 100644
--- a/spec/ci/factories/events.rb
+++ b/spec/factories/ci/events.rb
@@ -12,7 +12,7 @@
 #
 
 FactoryGirl.define do
-  factory :event, class: Event do
+  factory :ci_event, class: Ci::Event do
     sequence :description do |n|
       "updated project settings#{n}"
     end
diff --git a/spec/ci/factories/projects.rb b/spec/factories/ci/projects.rb
similarity index 93%
rename from spec/ci/factories/projects.rb
rename to spec/factories/ci/projects.rb
index fb5b563f2f267819b558d72774574efe2dde14ea..e6be88fa585f94e9e8006f7e26fbe783f8d60621 100644
--- a/spec/ci/factories/projects.rb
+++ b/spec/factories/ci/projects.rb
@@ -28,7 +28,7 @@
 # Read about factories at https://github.com/thoughtbot/factory_girl
 
 FactoryGirl.define do
-  factory :project_without_token, class: Project do
+  factory :ci_project_without_token, class: Ci::Project do
     sequence :name do |n|
       "GitLab / gitlab-shell#{n}"
     end
@@ -45,11 +45,11 @@ FactoryGirl.define do
 
     sequence :gitlab_id
 
-    factory :project do
+    factory :ci_project do
       token 'iPWx6WM4lhHNedGfBpPJNP'
     end
 
-    factory :public_project do
+    factory :ci_public_project do
       public true
     end
   end
diff --git a/spec/ci/factories/runner_projects.rb b/spec/factories/ci/runner_projects.rb
similarity index 86%
rename from spec/ci/factories/runner_projects.rb
rename to spec/factories/ci/runner_projects.rb
index b27632b3429a3b4a9c28e9cf677a6ce0d18ba7bc..3aa14ca434db06017a0b232540b0206ea41432cc 100644
--- a/spec/ci/factories/runner_projects.rb
+++ b/spec/factories/ci/runner_projects.rb
@@ -12,7 +12,7 @@
 # Read about factories at https://github.com/thoughtbot/factory_girl
 
 FactoryGirl.define do
-  factory :runner_project do
+  factory :ci_runner_project, class: Ci::RunnerProject do
     runner_id 1
     project_id 1
   end
diff --git a/spec/ci/factories/runners.rb b/spec/factories/ci/runners.rb
similarity index 94%
rename from spec/ci/factories/runners.rb
rename to spec/factories/ci/runners.rb
index 20a80f03268c5583176f5c6e537eaad2a9bb3fae..fec56b438fa146c72d57690d3eb75460be8f26c8 100644
--- a/spec/ci/factories/runners.rb
+++ b/spec/factories/ci/runners.rb
@@ -20,7 +20,7 @@
 # Read about factories at https://github.com/thoughtbot/factory_girl
 
 FactoryGirl.define do
-  factory :runner do
+  factory :ci_runner, class: Ci::Runner do
     sequence :description do |n|
       "My runner#{n}"
     end
diff --git a/spec/ci/factories/trigger_requests.rb b/spec/factories/ci/trigger_requests.rb
similarity index 100%
rename from spec/ci/factories/trigger_requests.rb
rename to spec/factories/ci/trigger_requests.rb
diff --git a/spec/ci/factories/triggers.rb b/spec/factories/ci/triggers.rb
similarity index 72%
rename from spec/ci/factories/triggers.rb
rename to spec/factories/ci/triggers.rb
index a5af47b7d7f4ec0435da19e2d1cf41dab1867dcc..38cd3cbceb6e172988b45009acd91f41ff94db62 100644
--- a/spec/ci/factories/triggers.rb
+++ b/spec/factories/ci/triggers.rb
@@ -1,7 +1,7 @@
 # Read about factories at https://github.com/thoughtbot/factory_girl
 
 FactoryGirl.define do
-  factory :trigger_without_token, class: Trigger do
+  factory :ci_trigger_without_token, class: Ci::Trigger do
     factory :trigger do
       token 'token'
     end
diff --git a/spec/ci/factories/web_hook.rb b/spec/factories/ci/web_hook.rb
similarity index 67%
rename from spec/ci/factories/web_hook.rb
rename to spec/factories/ci/web_hook.rb
index 3c027fb4861883b96fbbace68da2bc054b6020e4..1fde5805c943329fe0c900d9747fa96b5bdf4b01 100644
--- a/spec/ci/factories/web_hook.rb
+++ b/spec/factories/ci/web_hook.rb
@@ -1,5 +1,5 @@
 FactoryGirl.define do
-  factory :web_hook do
+  factory :ci_web_hook, class: Ci::WebHook do
     sequence(:url) { Faker::Internet.uri('http') }
     project
   end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index d0f1873ee2d2e8a19c9ed7326b981f0ccc289383..8442d3f44456bac19430617abfe2387e53b9b908 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -29,6 +29,9 @@ RSpec.configure do |config|
   config.include LoginHelpers,        type: :request
   config.include StubConfiguration
   config.include TestEnv
+  config.include StubGitlabCalls
+  config.include StubGitlabData
+
 
   config.infer_spec_type_from_file_location!
   config.raise_errors_for_deprecations!
diff --git a/spec/ci/support/gitlab_stubs/gitlab_ci.yml b/spec/support/gitlab_stubs/gitlab_ci.yml
similarity index 100%
rename from spec/ci/support/gitlab_stubs/gitlab_ci.yml
rename to spec/support/gitlab_stubs/gitlab_ci.yml
diff --git a/spec/ci/support/gitlab_stubs/project_8.json b/spec/support/gitlab_stubs/project_8.json
similarity index 100%
rename from spec/ci/support/gitlab_stubs/project_8.json
rename to spec/support/gitlab_stubs/project_8.json
diff --git a/spec/ci/support/gitlab_stubs/project_8_hooks.json b/spec/support/gitlab_stubs/project_8_hooks.json
similarity index 100%
rename from spec/ci/support/gitlab_stubs/project_8_hooks.json
rename to spec/support/gitlab_stubs/project_8_hooks.json
diff --git a/spec/ci/support/gitlab_stubs/projects.json b/spec/support/gitlab_stubs/projects.json
similarity index 100%
rename from spec/ci/support/gitlab_stubs/projects.json
rename to spec/support/gitlab_stubs/projects.json
diff --git a/spec/ci/support/gitlab_stubs/raw_project.yml b/spec/support/gitlab_stubs/raw_project.yml
similarity index 100%
rename from spec/ci/support/gitlab_stubs/raw_project.yml
rename to spec/support/gitlab_stubs/raw_project.yml
diff --git a/spec/ci/support/gitlab_stubs/session.json b/spec/support/gitlab_stubs/session.json
similarity index 100%
rename from spec/ci/support/gitlab_stubs/session.json
rename to spec/support/gitlab_stubs/session.json
diff --git a/spec/ci/support/gitlab_stubs/user.json b/spec/support/gitlab_stubs/user.json
similarity index 100%
rename from spec/ci/support/gitlab_stubs/user.json
rename to spec/support/gitlab_stubs/user.json
diff --git a/spec/ci/support/setup_builds_storage.rb b/spec/support/setup_builds_storage.rb
similarity index 100%
rename from spec/ci/support/setup_builds_storage.rb
rename to spec/support/setup_builds_storage.rb
diff --git a/spec/ci/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb
similarity index 100%
rename from spec/ci/support/stub_gitlab_calls.rb
rename to spec/support/stub_gitlab_calls.rb
diff --git a/spec/ci/support/stub_gitlab_data.rb b/spec/support/stub_gitlab_data.rb
similarity index 100%
rename from spec/ci/support/stub_gitlab_data.rb
rename to spec/support/stub_gitlab_data.rb