Commit fa71af71 authored by Justin Ramos's avatar Justin Ramos Committed by Benjamin Neff

require spec_helper in .rspec

closes #7223
parent 9f88850f
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
--color --color
--tag ~performance --tag ~performance
--order random --order random
--require spec_helper
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
* Refactor flash messages on ajax errors for comments, likes, reshares and aspect memberships [#7202](https://github.com/diaspora/diaspora/pull/7202) * Refactor flash messages on ajax errors for comments, likes, reshares and aspect memberships [#7202](https://github.com/diaspora/diaspora/pull/7202)
* Only require AWS-module for fog [#7201](https://github.com/diaspora/diaspora/pull/7201) * Only require AWS-module for fog [#7201](https://github.com/diaspora/diaspora/pull/7201)
* Only show community spotlight links on the contacts page if community spotlight is enabled [#7213](https://github.com/diaspora/diaspora/pull/7213) * Only show community spotlight links on the contacts page if community spotlight is enabled [#7213](https://github.com/diaspora/diaspora/pull/7213)
* Require spec\_helper in .rspec [#7223](https://github.com/diaspora/diaspora/pull/7223)
## Bug fixes ## Bug fixes
* Fix fetching comments after fetching likes [#7167](https://github.com/diaspora/diaspora/pull/7167) * Fix fetching comments after fetching likes [#7167](https://github.com/diaspora/diaspora/pull/7167)
......
require "spec_helper"
describe "ensure configuration effects" do describe "ensure configuration effects" do
it "sets the captcha length as required" do it "sets the captcha length as required" do
expect(SimpleCaptcha.length).to eq(AppConfig.settings.captcha.captcha_length.to_i) expect(SimpleCaptcha.length).to eq(AppConfig.settings.captcha.captcha_length.to_i)
......
require "spec_helper"
describe Admin::PodsController, type: :controller do describe Admin::PodsController, type: :controller do
before do before do
@user = FactoryGirl.create :user @user = FactoryGirl.create :user
......
require 'spec_helper'
describe Admin::UsersController, :type => :controller do describe Admin::UsersController, :type => :controller do
before do before do
@user = FactoryGirl.create :user @user = FactoryGirl.create :user
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe AdminsController, :type => :controller do describe AdminsController, :type => :controller do
before do before do
@user = FactoryGirl.create :user @user = FactoryGirl.create :user
......
require "spec_helper"
describe Api::OpenidConnect::AuthorizationsController, type: :controller do describe Api::OpenidConnect::AuthorizationsController, type: :controller do
let!(:client) { FactoryGirl.create(:o_auth_application) } let!(:client) { FactoryGirl.create(:o_auth_application) }
let!(:client_with_xss) { FactoryGirl.create(:o_auth_application_with_xss) } let!(:client_with_xss) { FactoryGirl.create(:o_auth_application_with_xss) }
......
require "spec_helper"
describe Api::OpenidConnect::ClientsController, type: :controller, suppress_csrf_verification: :none do describe Api::OpenidConnect::ClientsController, type: :controller, suppress_csrf_verification: :none do
describe "#create" do describe "#create" do
context "when valid parameters are passed" do context "when valid parameters are passed" do
......
require "spec_helper"
describe Api::OpenidConnect::DiscoveryController, type: :controller do describe Api::OpenidConnect::DiscoveryController, type: :controller do
describe "#webfinger" do describe "#webfinger" do
before do before do
......
require "spec_helper"
describe Api::OpenidConnect::IdTokensController, type: :controller do describe Api::OpenidConnect::IdTokensController, type: :controller do
describe "#jwks" do describe "#jwks" do
before do before do
......
require "spec_helper"
describe Api::OpenidConnect::TokenEndpointController, type: :controller, suppress_csrf_verification: :none do describe Api::OpenidConnect::TokenEndpointController, type: :controller, suppress_csrf_verification: :none do
let(:auth) { FactoryGirl.create(:auth_with_read) } let(:auth) { FactoryGirl.create(:auth_with_read) }
......
require "spec_helper"
describe Api::OpenidConnect::UserApplicationsController, type: :controller do describe Api::OpenidConnect::UserApplicationsController, type: :controller do
before do before do
@app = FactoryGirl.create(:o_auth_application_with_xss) @app = FactoryGirl.create(:o_auth_application_with_xss)
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe ApplicationController, :type => :controller do describe ApplicationController, :type => :controller do
controller do controller do
def index def index
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require "spec_helper"
describe AspectMembershipsController, type: :controller do describe AspectMembershipsController, type: :controller do
before do before do
@aspect0 = alice.aspects.first @aspect0 = alice.aspects.first
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe AspectsController, :type => :controller do describe AspectsController, :type => :controller do
before do before do
alice.getting_started = false alice.getting_started = false
......
require 'spec_helper'
describe BlocksController, :type => :controller do describe BlocksController, :type => :controller do
before do before do
sign_in alice sign_in alice
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe CommentsController, :type => :controller do describe CommentsController, :type => :controller do
before do before do
allow(@controller).to receive(:current_user).and_return(alice) allow(@controller).to receive(:current_user).and_return(alice)
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe ContactsController, :type => :controller do describe ContactsController, :type => :controller do
before do before do
sign_in bob, scope: :user sign_in bob, scope: :user
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe ConversationVisibilitiesController, :type => :controller do describe ConversationVisibilitiesController, :type => :controller do
before do before do
@user1 = alice @user1 = alice
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe ConversationsController, :type => :controller do describe ConversationsController, :type => :controller do
before do before do
sign_in alice, scope: :user sign_in alice, scope: :user
......
require "spec_helper"
describe HelpController, type: :controller do describe HelpController, type: :controller do
describe "#faq" do describe "#faq" do
it "succeeds" do it "succeeds" do
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require "spec_helper"
describe HomeController, type: :controller do describe HomeController, type: :controller do
describe "#show" do describe "#show" do
it "does not redirect for :html if there are at least 2 users and an admin" do it "does not redirect for :html if there are at least 2 users and an admin" do
......
require "spec_helper"
describe InvitationCodesController, type: :controller do describe InvitationCodesController, type: :controller do
describe "#show" do describe "#show" do
it "redirects to the root page if the invitation code is invalid" do it "redirects to the root page if the invitation code is invalid" do
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require "spec_helper"
describe InvitationsController, type: :controller do describe InvitationsController, type: :controller do
describe "#create" do describe "#create" do
let(:referer) { "http://test.host/cats/foo" } let(:referer) { "http://test.host/cats/foo" }
......
require "spec_helper"
describe AdminsController, type: :controller do describe AdminsController, type: :controller do
describe "#dashboard" do describe "#dashboard" do
before do before do
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe StreamsController, :type => :controller do describe StreamsController, :type => :controller do
describe '#aspects' do describe '#aspects' do
before do before do
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe ContactsController, :type => :controller do describe ContactsController, :type => :controller do
describe '#index' do describe '#index' do
before do before do
......
require 'spec_helper'
describe ConversationsController, :type => :controller do describe ConversationsController, :type => :controller do
describe '#index' do describe '#index' do
before do before do
......
require 'spec_helper'
describe NotificationsController, :type => :controller do describe NotificationsController, :type => :controller do
describe '#index' do describe '#index' do
before do before do
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe PeopleController, :type => :controller do describe PeopleController, :type => :controller do
describe '#index' do describe '#index' do
before do before do
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe PhotosController, :type => :controller do describe PhotosController, :type => :controller do
before do before do
@alices_photo = alice.post(:photo, :user_file => uploaded_photo, :to => alice.aspects.first.id, :public => false) @alices_photo = alice.post(:photo, :user_file => uploaded_photo, :to => alice.aspects.first.id, :public => false)
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe StatusMessagesController, :type => :controller do describe StatusMessagesController, :type => :controller do
describe '#bookmarklet' do describe '#bookmarklet' do
before do before do
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe StreamsController, :type => :controller do describe StreamsController, :type => :controller do
describe '#multi' do describe '#multi' do
before do before do
......
require "spec_helper"
describe UsersController, type: :controller do describe UsersController, type: :controller do
before do before do
sign_in alice, scope: :user sign_in alice, scope: :user
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe LikesController, :type => :controller do describe LikesController, :type => :controller do
before do before do
@alices_aspect = alice.aspects.where(:name => "generic").first @alices_aspect = alice.aspects.where(:name => "generic").first
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe MessagesController, :type => :controller do describe MessagesController, :type => :controller do
before do before do
sign_in(alice, scope: :user) sign_in(alice, scope: :user)
......
require "spec_helper"
describe NodeInfoController do describe NodeInfoController do
describe "#jrd" do describe "#jrd" do
it "responds to JSON" do it "responds to JSON" do
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe NotificationsController, :type => :controller do describe NotificationsController, :type => :controller do
before do before do
sign_in alice, scope: :user sign_in alice, scope: :user
......
require 'spec_helper'
describe ParticipationsController, :type => :controller do describe ParticipationsController, :type => :controller do
before do before do
allow(@controller).to receive(:current_user).and_return(alice) allow(@controller).to receive(:current_user).and_return(alice)
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require "spec_helper"
describe Devise::PasswordsController, type: :controller do describe Devise::PasswordsController, type: :controller do
before do before do
@request.env["devise.mapping"] = Devise.mappings[:user] @request.env["devise.mapping"] = Devise.mappings[:user]
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe PeopleController, :type => :controller do describe PeopleController, :type => :controller do
include_context :gon include_context :gon
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe PhotosController, :type => :controller do describe PhotosController, :type => :controller do
before do before do
@alices_photo = alice.post(:photo, :user_file => uploaded_photo, :to => alice.aspects.first.id, :public => false) @alices_photo = alice.post(:photo, :user_file => uploaded_photo, :to => alice.aspects.first.id, :public => false)
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require "spec_helper"
describe PostsController, type: :controller do describe PostsController, type: :controller do
let(:post) { alice.post(:status_message, text: "ohai", to: alice.aspects.first) } let(:post) { alice.post(:status_message, text: "ohai", to: alice.aspects.first) }
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe ProfilesController, :type => :controller do describe ProfilesController, :type => :controller do
before do before do
sign_in eve, scope: :user sign_in eve, scope: :user
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require "spec_helper"
describe RegistrationsController, type: :controller do describe RegistrationsController, type: :controller do
before do before do
request.env["devise.mapping"] = Devise.mappings[:user] request.env["devise.mapping"] = Devise.mappings[:user]
......
# Copyright (c) 2010-2011, Diaspora Inc. This file is # Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require "spec_helper"
describe ReportController, type: :controller do describe ReportController, type: :controller do
before do before do
sign_in alice sign_in alice
......
require 'spec_helper'
describe ResharesController, :type => :controller do describe ResharesController, :type => :controller do
describe '#create' do describe '#create' do
let(:post_request!) { let(:post_request!) {
......
require 'spec_helper'
describe SearchController, :type => :controller do describe SearchController, :type => :controller do
before do before do
@user = alice @user = alice
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
require 'spec_helper'
describe ServicesController, :type => :controller do describe ServicesController