diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-18 04:30:58 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-22 13:13:49 +0300 |
commit | bf71d53f634926bee91955c8ecee7a3869fcd518 (patch) | |
tree | 7e7a78de896f7aa154014420befcf1f01f6b0368 /spec | |
parent | 0f627f1c6046be06986ee0e6e46d390ec2c18507 (diff) |
Change `to_not` calls to `not_to`
Both work, but now we're consistent across the entire app.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/commit_controller_spec.rb | 8 | ||||
-rw-r--r-- | spec/controllers/projects/merge_requests_controller_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/issues_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/auth_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/google_code_import/client_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/google_code_import/importer_spec.rb | 8 | ||||
-rw-r--r-- | spec/lib/gitlab/ldap/user_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/o_auth/auth_hash_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/project_members_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/projects_spec.rb | 4 | ||||
-rw-r--r-- | spec/requests/api/system_hooks_spec.rb | 2 | ||||
-rw-r--r-- | spec/tasks/gitlab/backup_rake_spec.rb | 2 | ||||
-rw-r--r-- | spec/tasks/gitlab/mail_google_schema_whitelisting.rb | 2 |
13 files changed, 25 insertions, 25 deletions
diff --git a/spec/controllers/commit_controller_spec.rb b/spec/controllers/commit_controller_spec.rb index 2cfa399a047..34ee61f7ede 100644 --- a/spec/controllers/commit_controller_spec.rb +++ b/spec/controllers/commit_controller_spec.rb @@ -40,10 +40,10 @@ describe Projects::CommitController do get(:show, namespace_id: project.namespace.to_param, project_id: project.to_param, id: commit.id, format: format) - expect(response.body).to_not include('&') - expect(response.body).to_not include('>') - expect(response.body).to_not include('<') - expect(response.body).to_not include('"') + expect(response.body).not_to include('&') + expect(response.body).not_to include('>') + expect(response.body).not_to include('<') + expect(response.body).not_to include('"') end end diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 5cc5bd78cd7..b9c6f6e472e 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -40,10 +40,10 @@ describe Projects::MergeRequestsController do get(:show, namespace_id: project.namespace.to_param, project_id: project.to_param, id: merge_request.iid, format: format) - expect(response.body).to_not include('&') - expect(response.body).to_not include('>') - expect(response.body).to_not include('<') - expect(response.body).to_not include('"') + expect(response.body).not_to include('&') + expect(response.body).not_to include('>') + expect(response.body).not_to include('<') + expect(response.body).not_to include('"') end end diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index d803a1805de..1f2675044d3 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -38,7 +38,7 @@ describe 'Issues', feature: true do it 'does not change issue count' do expect { click_button 'Save changes' - }.to_not change { Issue.count } + }.not_to change { Issue.count } end it 'should update issue fields' do diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index 81850d42c90..72806bebe1f 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -27,12 +27,12 @@ describe Gitlab::Auth do it "should not find user with invalid password" do password = 'wrong' - expect( gl_auth.find(username, password) ).to_not eql user + expect( gl_auth.find(username, password) ).not_to eql user end it "should not find user with invalid login" do user = 'wrong' - expect( gl_auth.find(username, password) ).to_not eql user + expect( gl_auth.find(username, password) ).not_to eql user end context "with ldap enabled" do diff --git a/spec/lib/gitlab/google_code_import/client_spec.rb b/spec/lib/gitlab/google_code_import/client_spec.rb index a66b811e0fd..6aa4428f367 100644 --- a/spec/lib/gitlab/google_code_import/client_spec.rb +++ b/spec/lib/gitlab/google_code_import/client_spec.rb @@ -15,7 +15,7 @@ describe Gitlab::GoogleCodeImport::Client do let(:raw_data) { "No clue" } it "returns true" do - expect(subject).to_not be_valid + expect(subject).not_to be_valid end end end diff --git a/spec/lib/gitlab/google_code_import/importer_spec.rb b/spec/lib/gitlab/google_code_import/importer_spec.rb index 67378328336..6a7a31239c3 100644 --- a/spec/lib/gitlab/google_code_import/importer_spec.rb +++ b/spec/lib/gitlab/google_code_import/importer_spec.rb @@ -25,7 +25,7 @@ describe Gitlab::GoogleCodeImport::Importer do subject.execute %w(New NeedInfo Accepted Wishlist Started Fixed Invalid Duplicate WontFix Incomplete).each do |status| - expect(project.labels.find_by(name: "Status: #{status}")).to_not be_nil + expect(project.labels.find_by(name: "Status: #{status}")).not_to be_nil end end @@ -39,7 +39,7 @@ describe Gitlab::GoogleCodeImport::Importer do Component-Systray Component-Clock Component-Launcher Component-Tint2conf Component-Docs Component-New ).each do |label| label.sub!("-", ": ") - expect(project.labels.find_by(name: label)).to_not be_nil + expect(project.labels.find_by(name: label)).not_to be_nil end end @@ -47,7 +47,7 @@ describe Gitlab::GoogleCodeImport::Importer do subject.execute issue = project.issues.first - expect(issue).to_not be_nil + expect(issue).not_to be_nil expect(issue.iid).to eq(169) expect(issue.author).to eq(project.creator) expect(issue.assignee).to eq(mapped_user) @@ -72,7 +72,7 @@ describe Gitlab::GoogleCodeImport::Importer do subject.execute note = project.issues.first.notes.first - expect(note).to_not be_nil + expect(note).not_to be_nil expect(note.note).to include("Comment 1") expect(note.note).to include("@#{mapped_user.username}") expect(note.note).to include("November 18, 2009 05:14") diff --git a/spec/lib/gitlab/ldap/user_spec.rb b/spec/lib/gitlab/ldap/user_spec.rb index 8689b8c7edd..7cfca96f4e0 100644 --- a/spec/lib/gitlab/ldap/user_spec.rb +++ b/spec/lib/gitlab/ldap/user_spec.rb @@ -35,12 +35,12 @@ describe Gitlab::LDAP::User do it "finds the user if already existing" do create(:omniauth_user, extern_uid: 'my-uid', provider: 'ldapmain') - expect{ ldap_user.save }.to_not change{ User.count } + expect{ ldap_user.save }.not_to change{ User.count } end it "connects to existing non-ldap user if the email matches" do existing_user = create(:omniauth_user, email: 'john@example.com', provider: "twitter") - expect{ ldap_user.save }.to_not change{ User.count } + expect{ ldap_user.save }.not_to change{ User.count } existing_user.reload expect(existing_user.ldap_identity.extern_uid).to eql 'my-uid' diff --git a/spec/lib/gitlab/o_auth/auth_hash_spec.rb b/spec/lib/gitlab/o_auth/auth_hash_spec.rb index 165cde4f160..5404b506813 100644 --- a/spec/lib/gitlab/o_auth/auth_hash_spec.rb +++ b/spec/lib/gitlab/o_auth/auth_hash_spec.rb @@ -51,7 +51,7 @@ describe Gitlab::OAuth::AuthHash do it { expect(auth_hash.email).to eql email_utf8 } it { expect(auth_hash.username).to eql nickname_utf8 } it { expect(auth_hash.name).to eql name_utf8 } - it { expect(auth_hash.password).to_not be_empty } + it { expect(auth_hash.password).not_to be_empty } end context 'email not provided' do diff --git a/spec/requests/api/project_members_spec.rb b/spec/requests/api/project_members_spec.rb index 8419a364ed1..4aeaa02f958 100644 --- a/spec/requests/api/project_members_spec.rb +++ b/spec/requests/api/project_members_spec.rb @@ -132,7 +132,7 @@ describe API::API, api: true do delete api("/projects/#{project.id}/members/#{user3.id}", user) expect { delete api("/projects/#{project.id}/members/#{user3.id}", user) - }.to_not change { ProjectMember.count } + }.not_to change { ProjectMember.count } end it "should return 200 if team member already removed" do diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 401b176486d..1386c03cb21 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -155,7 +155,7 @@ describe API::API, api: true do end it 'should not create new project without name and return 400' do - expect { post api('/projects', user) }.to_not change { Project.count } + expect { post api('/projects', user) }.not_to change { Project.count } expect(response.status).to eq(400) end @@ -254,7 +254,7 @@ describe API::API, api: true do it 'should respond with 400 on failure and not project' do expect { post api("/projects/user/#{user.id}", admin) }. - to_not change { Project.count } + not_to change { Project.count } expect(response.status).to eq(400) expect(json_response['message']['name']).to eq([ diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb index a9d86bbce6c..2c691f72f15 100644 --- a/spec/requests/api/system_hooks_spec.rb +++ b/spec/requests/api/system_hooks_spec.rb @@ -49,7 +49,7 @@ describe API::API, api: true do it "should not create new hook without url" do expect { post api("/hooks", admin) - }.to_not change { SystemHook.count } + }.not_to change { SystemHook.count } end end diff --git a/spec/tasks/gitlab/backup_rake_spec.rb b/spec/tasks/gitlab/backup_rake_spec.rb index 4ee3841559c..2f90b67aef1 100644 --- a/spec/tasks/gitlab/backup_rake_spec.rb +++ b/spec/tasks/gitlab/backup_rake_spec.rb @@ -150,7 +150,7 @@ describe 'gitlab:app namespace rake task' do expect(Rake::Task["gitlab:backup:db:restore"]).to receive :invoke expect(Rake::Task["gitlab:backup:repo:restore"]).not_to receive :invoke expect(Rake::Task["gitlab:shell:setup"]).to receive :invoke - expect { run_rake_task('gitlab:backup:restore') }.to_not raise_error + expect { run_rake_task('gitlab:backup:restore') }.not_to raise_error end end end # gitlab:app namespace diff --git a/spec/tasks/gitlab/mail_google_schema_whitelisting.rb b/spec/tasks/gitlab/mail_google_schema_whitelisting.rb index 22e746870dc..37feb5e6faf 100644 --- a/spec/tasks/gitlab/mail_google_schema_whitelisting.rb +++ b/spec/tasks/gitlab/mail_google_schema_whitelisting.rb @@ -21,7 +21,7 @@ describe 'gitlab:mail_google_schema_whitelisting rake task' do end it 'should run the task without errors' do - expect { run_rake_task }.to_not raise_error + expect { run_rake_task }.not_to raise_error end end end |