diff --git a/features/step_definitions/project/projects_steps.rb b/features/step_definitions/project/projects_steps.rb
index 3ff08d584489df7f5e6f8897eebf26d93381a924..d981e1f380290601f301b86698e4ac61fecab54f 100644
--- a/features/step_definitions/project/projects_steps.rb
+++ b/features/step_definitions/project/projects_steps.rb
@@ -1,4 +1,4 @@
-include LoginMacros
+include LoginHelpers
 
 Given /^I signin as a user$/ do
   login_as :user
diff --git a/features/support/env.rb b/features/support/env.rb
index b69a5fe7f072c546c9b92d004c42262aa8a20d94..80a465b472c4fcbbdd49115a0f55fb4b74a17df8 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -7,9 +7,9 @@ require 'cucumber/rails'
 require 'webmock/cucumber'
 WebMock.allow_net_connect!
 
-require Rails.root.join 'spec/monkeypatch'
 require Rails.root.join 'spec/factories'
-require Rails.root.join 'spec/support/login'
+require Rails.root.join 'spec/support/monkeypatch'
+require Rails.root.join 'spec/support/login_helpers'
 require Rails.root.join 'spec/support/valid_commit'
 
 Capybara.default_selector = :css
diff --git a/spec/api/issues_spec.rb b/spec/requests/api/issues_spec.rb
similarity index 100%
rename from spec/api/issues_spec.rb
rename to spec/requests/api/issues_spec.rb
diff --git a/spec/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
similarity index 100%
rename from spec/api/projects_spec.rb
rename to spec/requests/api/projects_spec.rb
diff --git a/spec/api/users_spec.rb b/spec/requests/api/users_spec.rb
similarity index 100%
rename from spec/api/users_spec.rb
rename to spec/requests/api/users_spec.rb
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index cd931475486b92a766b1e6be86f26636bad20700..d3635ed1979fd9942026d7b4c0a8863aaa233632 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -9,10 +9,8 @@ require File.expand_path("../../config/environment", __FILE__)
 require 'rspec/rails'
 require 'capybara/rails'
 require 'capybara/rspec'
-require 'capybara/dsl'
 require 'webmock/rspec'
 require 'factories'
-require 'monkeypatch'
 require 'email_spec'
 require 'headless'
 
@@ -23,10 +21,13 @@ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
 # Use capybara-webkit
 Capybara.javascript_driver = :webkit
 
+WebMock.disable_net_connect!(allow_localhost: true)
+
 RSpec.configure do |config|
   config.mock_with :rspec
 
-  config.include LoginMacros
+  config.include LoginHelpers, type: :request
+  config.include ApiHelpers,   type: :request
 
   # 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
@@ -38,35 +39,9 @@ RSpec.configure do |config|
     headless.start
   end
 
-  config.before :each, type: :integration do
-    DeviseSessionMock.disable
-  end
-
   config.before do
-    if example.metadata[:js]
-      DatabaseCleaner.strategy = :truncation
-      Capybara::Selenium::Driver::DEFAULT_OPTIONS[:resynchronize] = true
-    else
-      DatabaseCleaner.strategy = :transaction
-    end
-
-    DatabaseCleaner.start
-
-    WebMock.disable_net_connect!(allow_localhost: true)
-
     # !!! Observers disabled by default in tests
-    #
-    #   Use next code to enable observers
-    #   before(:each) { ActiveRecord::Base.observers.enable(:all) }
-    #
-    ActiveRecord::Base.observers.disable :all
-  end
-
-  config.after do
-    DatabaseCleaner.clean
+    ActiveRecord::Base.observers.disable(:all)
+    # ActiveRecord::Base.observers.enable(:all)
   end
-
-  config.include RSpec::Rails::RequestExampleGroup, type: :request, example_group: {
-    file_path: /spec\/api/
-  }
 end
diff --git a/spec/support/api.rb b/spec/support/api.rb
deleted file mode 100644
index d363d8b9a578eae234c0e049f0b4f03e83ce14a2..0000000000000000000000000000000000000000
--- a/spec/support/api.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-def api_prefix
-  "/api/#{Gitlab::API::VERSION}"
-end
-
-def json_response
-  JSON.parse(response.body)
-end
diff --git a/spec/support/api_helpers.rb b/spec/support/api_helpers.rb
new file mode 100644
index 0000000000000000000000000000000000000000..e35d5735ec3025302965404766113e87ba10f1a7
--- /dev/null
+++ b/spec/support/api_helpers.rb
@@ -0,0 +1,9 @@
+module ApiHelpers
+  def api_prefix
+    "/api/#{Gitlab::API::VERSION}"
+  end
+
+  def json_response
+    JSON.parse(response.body)
+  end
+end
diff --git a/spec/support/db_cleaner.rb b/spec/support/db_cleaner.rb
new file mode 100644
index 0000000000000000000000000000000000000000..f1e072aa15f7f71974cb4633cf9fc1da4c42e39d
--- /dev/null
+++ b/spec/support/db_cleaner.rb
@@ -0,0 +1,18 @@
+require 'database_cleaner'
+
+RSpec.configure do |config|
+  config.before do
+    if example.metadata[:js]
+      DatabaseCleaner.strategy = :truncation
+      Capybara::Selenium::Driver::DEFAULT_OPTIONS[:resynchronize] = true
+    else
+      DatabaseCleaner.strategy = :transaction
+    end
+
+    DatabaseCleaner.start
+  end
+
+  config.after do
+    DatabaseCleaner.clean
+  end
+end
diff --git a/spec/support/js_patch.rb b/spec/support/js_patch.rb
deleted file mode 100644
index 0d4ab264e858956c04146a28f001d670646362ad..0000000000000000000000000000000000000000
--- a/spec/support/js_patch.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-module JsPatch
-  def confirm_js_popup
-    page.evaluate_script("window.alert = function(msg) { return true; }")
-    page.evaluate_script("window.confirm = function(msg) { return true; }")
-  end
-end
diff --git a/spec/support/login.rb b/spec/support/login.rb
deleted file mode 100644
index 78a907bad0b196f176811588df88b714072f1874..0000000000000000000000000000000000000000
--- a/spec/support/login.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-module LoginMacros
-  def login_as role
-    @user = User.create(email: "user#{User.count}@mail.com",
-                        name: "John Smith",
-                        password: "123456",
-                        password_confirmation: "123456",
-                        skype: 'user_skype')
-
-    if role == :admin
-      @user.admin = true
-      @user.save!
-    end
-
-    visit new_user_session_path
-    fill_in "user_email", with: @user.email
-    fill_in "user_password", with: "123456"
-    click_button "Sign in"
-  end
-
-  def login_with(user)
-    visit new_user_session_path
-    fill_in "user_email", with: user.email
-    fill_in "user_password", with: "123456"
-    click_button "Sign in"
-  end
-
-  def logout
-    click_link "Logout" rescue nil
-  end
-end
diff --git a/spec/support/login_helpers.rb b/spec/support/login_helpers.rb
new file mode 100644
index 0000000000000000000000000000000000000000..769034e2286ddc8bad23d613c775d0b6b0f46051
--- /dev/null
+++ b/spec/support/login_helpers.rb
@@ -0,0 +1,23 @@
+module LoginHelpers
+  # Internal: Create and log in as a user of the specified role
+  #
+  # role - User role (e.g., :admin, :user)
+  def login_as(role)
+    @user = Factory(role)
+    login_with(@user)
+  end
+
+  # Internal: Login as the specified user
+  #
+  # user - User instance to login with
+  def login_with(user)
+    visit new_user_session_path
+    fill_in "user_email", with: user.email
+    fill_in "user_password", with: "123456"
+    click_button "Sign in"
+  end
+
+  def logout
+    click_link "Logout" rescue nil
+  end
+end
diff --git a/spec/monkeypatch.rb b/spec/support/monkeypatch.rb
similarity index 100%
rename from spec/monkeypatch.rb
rename to spec/support/monkeypatch.rb
diff --git a/spec/support/shared_examples.rb b/spec/support/shared_examples.rb
deleted file mode 100644
index 9fd207d0db25771e7410edac89654f6dbf0c36ae..0000000000000000000000000000000000000000
--- a/spec/support/shared_examples.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-shared_examples_for :project_side_pane do
-  subject { page }
-  it { should have_content((@project || project).name) }
-  it { should have_content("Commits") }
-  it { should have_content("Files") }
-end
-
-shared_examples_for :tree_view do
-  subject { page }
-
-  it "should have Tree View of project" do
-    should have_content("app")
-    should have_content("History")
-    should have_content("Gemfile")
-  end
-end