Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
require spec_helper in .rspec
closes #7223
  • Loading branch information
Justin Ramos authored and SuperTux88 committed Nov 27, 2016
1 parent 9f88850 commit fa71af7
Show file tree
Hide file tree
Showing 245 changed files with 2 additions and 482 deletions.
1 change: 1 addition & 0 deletions .rspec
Expand Up @@ -3,3 +3,4 @@
--color
--tag ~performance
--order random
--require spec_helper
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -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)
* 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)
* Require spec\_helper in .rspec [#7223](https://github.com/diaspora/diaspora/pull/7223)

## Bug fixes
* Fix fetching comments after fetching likes [#7167](https://github.com/diaspora/diaspora/pull/7167)
Expand Down
2 changes: 0 additions & 2 deletions spec/configuration_methods_spec.rb
@@ -1,5 +1,3 @@
require "spec_helper"

describe "ensure configuration effects" do
it "sets the captcha length as required" do
expect(SimpleCaptcha.length).to eq(AppConfig.settings.captcha.captcha_length.to_i)
Expand Down
3 changes: 0 additions & 3 deletions spec/controllers/admin/pods_controller_spec.rb
@@ -1,6 +1,3 @@

require "spec_helper"

describe Admin::PodsController, type: :controller do
before do
@user = FactoryGirl.create :user
Expand Down
3 changes: 0 additions & 3 deletions spec/controllers/admin/users_controller_spec.rb
@@ -1,6 +1,3 @@

require 'spec_helper'

describe Admin::UsersController, :type => :controller do
before do
@user = FactoryGirl.create :user
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/admins_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe AdminsController, :type => :controller do
before do
@user = FactoryGirl.create :user
Expand Down
@@ -1,5 +1,3 @@
require "spec_helper"

describe Api::OpenidConnect::AuthorizationsController, type: :controller do
let!(:client) { FactoryGirl.create(:o_auth_application) }
let!(:client_with_xss) { FactoryGirl.create(:o_auth_application_with_xss) }
Expand Down
@@ -1,5 +1,3 @@
require "spec_helper"

describe Api::OpenidConnect::ClientsController, type: :controller, suppress_csrf_verification: :none do
describe "#create" do
context "when valid parameters are passed" do
Expand Down
@@ -1,5 +1,3 @@
require "spec_helper"

describe Api::OpenidConnect::DiscoveryController, type: :controller do
describe "#webfinger" do
before do
Expand Down
@@ -1,5 +1,3 @@
require "spec_helper"

describe Api::OpenidConnect::IdTokensController, type: :controller do
describe "#jwks" do
before do
Expand Down
@@ -1,5 +1,3 @@
require "spec_helper"

describe Api::OpenidConnect::TokenEndpointController, type: :controller, suppress_csrf_verification: :none do
let(:auth) { FactoryGirl.create(:auth_with_read) }

Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/api/openid_connect/user_applications_spec.rb
@@ -1,5 +1,3 @@
require "spec_helper"

describe Api::OpenidConnect::UserApplicationsController, type: :controller do
before do
@app = FactoryGirl.create(:o_auth_application_with_xss)
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/application_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe ApplicationController, :type => :controller do
controller do
def index
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/aspect_memberships_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require "spec_helper"

describe AspectMembershipsController, type: :controller do
before do
@aspect0 = alice.aspects.first
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/aspects_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe AspectsController, :type => :controller do
before do
alice.getting_started = false
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/blocks_controller_spec.rb
@@ -1,5 +1,3 @@
require 'spec_helper'

describe BlocksController, :type => :controller do
before do
sign_in alice
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/comments_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe CommentsController, :type => :controller do
before do
allow(@controller).to receive(:current_user).and_return(alice)
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/contacts_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe ContactsController, :type => :controller do
before do
sign_in bob, scope: :user
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/conversation_visibilities_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe ConversationVisibilitiesController, :type => :controller do
before do
@user1 = alice
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/conversations_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe ConversationsController, :type => :controller do
before do
sign_in alice, scope: :user
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/help_controller_spec.rb
@@ -1,5 +1,3 @@
require "spec_helper"

describe HelpController, type: :controller do
describe "#faq" do
it "succeeds" do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/home_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require "spec_helper"

describe HomeController, type: :controller do
describe "#show" do
it "does not redirect for :html if there are at least 2 users and an admin" do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/invitation_codes_controller_spec.rb
@@ -1,5 +1,3 @@
require "spec_helper"

describe InvitationCodesController, type: :controller do
describe "#show" do
it "redirects to the root page if the invitation code is invalid" do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/invitations_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require "spec_helper"

describe InvitationsController, type: :controller do
describe "#create" do
let(:referer) { "http://test.host/cats/foo" }
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/admins_spec.rb
@@ -1,5 +1,3 @@
require "spec_helper"

describe AdminsController, type: :controller do
describe "#dashboard" do
before do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/aspects_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe StreamsController, :type => :controller do
describe '#aspects' do
before do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/contacts_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe ContactsController, :type => :controller do
describe '#index' do
before do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/conversations_spec.rb
@@ -1,5 +1,3 @@
require 'spec_helper'

describe ConversationsController, :type => :controller do
describe '#index' do
before do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/notifications_spec.rb
@@ -1,5 +1,3 @@
require 'spec_helper'

describe NotificationsController, :type => :controller do
describe '#index' do
before do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/people_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe PeopleController, :type => :controller do
describe '#index' do
before do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/photos_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe PhotosController, :type => :controller do
before do
@alices_photo = alice.post(:photo, :user_file => uploaded_photo, :to => alice.aspects.first.id, :public => false)
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/status_messages_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe StatusMessagesController, :type => :controller do
describe '#bookmarklet' do
before do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/streams_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe StreamsController, :type => :controller do
describe '#multi' do
before do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/jasmine_fixtures/users_spec.rb
@@ -1,5 +1,3 @@
require "spec_helper"

describe UsersController, type: :controller do
before do
sign_in alice, scope: :user
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/likes_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe LikesController, :type => :controller do
before do
@alices_aspect = alice.aspects.where(:name => "generic").first
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/messages_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe MessagesController, :type => :controller do
before do
sign_in(alice, scope: :user)
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/node_info_controller_spec.rb
@@ -1,5 +1,3 @@
require "spec_helper"

describe NodeInfoController do
describe "#jrd" do
it "responds to JSON" do
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/notifications_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe NotificationsController, :type => :controller do
before do
sign_in alice, scope: :user
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/participations_controller_spec.rb
@@ -1,5 +1,3 @@
require 'spec_helper'

describe ParticipationsController, :type => :controller do
before do
allow(@controller).to receive(:current_user).and_return(alice)
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/passwords_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require "spec_helper"

describe Devise::PasswordsController, type: :controller do
before do
@request.env["devise.mapping"] = Devise.mappings[:user]
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/people_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe PeopleController, :type => :controller do
include_context :gon

Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/photos_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe PhotosController, :type => :controller do
before do
@alices_photo = alice.post(:photo, :user_file => uploaded_photo, :to => alice.aspects.first.id, :public => false)
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/posts_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require "spec_helper"

describe PostsController, type: :controller do
let(:post) { alice.post(:status_message, text: "ohai", to: alice.aspects.first) }

Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/profiles_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe ProfilesController, :type => :controller do
before do
sign_in eve, scope: :user
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/registrations_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require "spec_helper"

describe RegistrationsController, type: :controller do
before do
request.env["devise.mapping"] = Devise.mappings[:user]
Expand Down
3 changes: 0 additions & 3 deletions spec/controllers/report_controller_spec.rb
@@ -1,10 +1,7 @@

# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require "spec_helper"

describe ReportController, type: :controller do
before do
sign_in alice
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/reshares_controller_spec.rb
@@ -1,5 +1,3 @@
require 'spec_helper'

describe ResharesController, :type => :controller do
describe '#create' do
let(:post_request!) {
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/search_controller_spec.rb
@@ -1,5 +1,3 @@
require 'spec_helper'

describe SearchController, :type => :controller do
before do
@user = alice
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/services_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe ServicesController, :type => :controller do
let(:omniauth_auth) do
{ 'provider' => 'facebook',
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/sessions_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require "spec_helper"

describe SessionsController, type: :controller do
let(:mock_access_token) { Object.new }

Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/share_visibilities_controller_spec.rb
Expand Up @@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.

require 'spec_helper'

describe ShareVisibilitiesController, :type => :controller do
before do
@status = alice.post(:status_message, :text => "hello", :to => alice.aspects.first)
Expand Down

0 comments on commit fa71af7

Please sign in to comment.