Skip to content
Snippets Groups Projects
Commit 111fdd25 authored by Robert Speicher's avatar Robert Speicher
Browse files

Don't `describe` symbols

parent 251ca535
No related branches found
No related tags found
No related merge requests found
Showing
with 54 additions and 54 deletions
require 'spec_helper'
 
describe UserHelper do
describe :user_avatar_url do
describe 'user_avatar_url' do
let (:user) { User.new({'avatar_url' => avatar_url}) }
 
context 'no avatar' do
Loading
Loading
require 'spec_helper'
 
describe UserSessionsHelper do
describe :generate_oauth_hmac do
describe 'generate_oauth_hmac' do
let (:salt) { 'a' }
let (:salt2) { 'b' }
let (:return_to) { 'b' }
Loading
Loading
@@ -21,7 +21,7 @@ describe UserSessionsHelper do
end
end
 
describe :generate_oauth_state do
describe 'generate_oauth_state' do
let (:return_to) { 'b' }
 
it 'should return null if return_to is also null' do
Loading
Loading
@@ -35,7 +35,7 @@ describe UserSessionsHelper do
end
end
 
describe :get_ouath_state_return_to do
describe 'get_ouath_state_return_to' do
let (:return_to) { 'a' }
let (:state) { generate_oauth_state(return_to) }
 
Loading
Loading
@@ -44,7 +44,7 @@ describe UserSessionsHelper do
end
end
 
describe :is_oauth_state_valid? do
describe 'is_oauth_state_valid?' do
let (:return_to) { 'a' }
let (:state) { generate_oauth_state(return_to) }
let (:forged) { "forged#{state}" }
Loading
Loading
Loading
Loading
@@ -39,7 +39,7 @@ describe Build do
it { should respond_to :pending? }
it { should respond_to :trace_html }
 
describe :first_pending do
describe '.first_pending' do
let(:first) { FactoryGirl.create :build, commit: commit, status: 'pending', created_at: Date.yesterday }
let(:second) { FactoryGirl.create :build, commit: commit, status: 'pending' }
before { first; second }
Loading
Loading
@@ -49,7 +49,7 @@ describe Build do
it('returns with the first pending build') { should eq(first) }
end
 
describe :create_from do
describe '.create_from' do
before do
build.status = 'success'
build.save
Loading
Loading
@@ -63,7 +63,7 @@ describe Build do
end
end
 
describe :started? do
describe '#started?' do
subject { build.started? }
 
context 'without started_at' do
Loading
Loading
@@ -89,7 +89,7 @@ describe Build do
end
end
 
describe :active? do
describe '#active?' do
subject { build.active? }
 
%w(pending running).each do |state|
Loading
Loading
@@ -109,7 +109,7 @@ describe Build do
end
end
 
describe :complete? do
describe '#complete?' do
subject { build.complete? }
 
%w(success failed canceled).each do |state|
Loading
Loading
@@ -129,7 +129,7 @@ describe Build do
end
end
 
describe :ignored? do
describe '#ignored?' do
subject { build.ignored? }
 
context 'if build is not allowed to fail' do
Loading
Loading
@@ -165,7 +165,7 @@ describe Build do
end
end
 
describe :trace do
describe '#trace' do
subject { build.trace_html }
 
it { should be_empty }
Loading
Loading
@@ -179,13 +179,13 @@ describe Build do
end
end
 
describe :timeout do
describe '#timeout' do
subject { build.timeout }
 
it { should eq(commit.project.timeout) }
end
 
describe :duration do
describe '#duration' do
subject { build.duration }
 
it { should eq(120.0) }
Loading
Loading
@@ -210,7 +210,7 @@ describe Build do
end
end
 
describe :options do
describe '#options' do
let(:options) {
{
:image => "ruby:2.1",
Loading
Loading
@@ -224,61 +224,61 @@ describe Build do
it { should eq(options) }
end
 
describe :ref do
describe '#ref' do
subject { build.ref }
 
it { should eq(commit.ref) }
end
 
describe :sha do
describe '#sha' do
subject { build.sha }
 
it { should eq(commit.sha) }
end
 
describe :short_sha do
describe '#short_sha' do
subject { build.short_sha }
 
it { should eq(commit.short_sha) }
end
 
describe :before_sha do
describe '#before_sha' do
subject { build.before_sha }
 
it { should eq(commit.before_sha) }
end
 
describe :allow_git_fetch do
describe '#allow_git_fetch' do
subject { build.allow_git_fetch }
 
it { should eq(project.allow_git_fetch) }
end
 
describe :project do
describe '#project' do
subject { build.project }
 
it { should eq(commit.project) }
end
 
describe :project_id do
describe '#project_id' do
subject { build.project_id }
 
it { should eq(commit.project_id) }
end
 
describe :project_name do
describe '#project_name' do
subject { build.project_name }
 
it { should eq(project.name) }
end
 
describe :repo_url do
describe '#repo_url' do
subject { build.repo_url }
 
it { should eq(project.repo_url_with_auth) }
end
 
describe :extract_coverage do
describe '#extract_coverage' do
context 'valid content & regex' do
subject { build.extract_coverage('Coverage 1033 / 1051 LOC (98.29%) covered', '\(\d+.\d+\%\) covered') }
 
Loading
Loading
@@ -304,7 +304,7 @@ describe Build do
end
end
 
describe :variables do
describe '#variables' do
context 'returns variables' do
subject { build.variables }
 
Loading
Loading
Loading
Loading
@@ -34,7 +34,7 @@ describe Commit do
it { should respond_to :git_author_email }
it { should respond_to :short_sha }
 
describe :last_build do
describe '#last_build' do
subject { commit.last_build }
before do
@first = FactoryGirl.create :build, commit: commit, created_at: Date.yesterday
Loading
Loading
@@ -45,7 +45,7 @@ describe Commit do
it('returns with the most recently created build') { should eq(@second) }
end
 
describe :retry do
describe '#retry' do
before do
@first = FactoryGirl.create :build, commit: commit, created_at: Date.yesterday
@second = FactoryGirl.create :build, commit: commit
Loading
Loading
@@ -58,7 +58,7 @@ describe Commit do
end
end
 
describe :project_recipients do
describe '#project_recipients' do
 
context 'always sending notification' do
it 'should return commit_pusher_email as only recipient when no additional recipients are given' do
Loading
Loading
@@ -101,7 +101,7 @@ describe Commit do
end
end
 
describe :valid_commit_sha do
describe '#valid_commit_sha' do
context 'commit.sha can not start with 00000000' do
before do
commit.sha = '0' * 40
Loading
Loading
@@ -112,7 +112,7 @@ describe Commit do
end
end
 
describe :compare? do
describe '#compare?' do
subject { commit_with_project.compare? }
 
context 'if commit.before_sha are not nil' do
Loading
Loading
@@ -120,21 +120,21 @@ describe Commit do
end
end
 
describe :short_sha do
describe '#short_before_sha' do
subject { commit.short_before_sha }
 
it { should have(8).items }
it { commit.before_sha.should start_with(subject) }
end
 
describe :short_sha do
describe '#short_sha' do
subject { commit.short_sha }
 
it { should have(8).items }
it { commit.sha.should start_with(subject) }
end
 
describe :create_next_builds do
describe '#create_next_builds' do
before do
commit.stub(:config_processor).and_return(config_processor)
end
Loading
Loading
@@ -156,7 +156,7 @@ describe Commit do
end
end
 
describe :create_builds do
describe '#create_builds' do
before do
commit.stub(:config_processor).and_return(config_processor)
end
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Network do
let(:network) { Network.new }
 
describe :enable_ci do
describe '#enable_ci' do
subject { network.enable_ci '', '', '' }
 
context 'on success' do
Loading
Loading
@@ -27,7 +27,7 @@ describe Network do
end
end
 
describe :disable_ci do
describe '#disable_ci' do
let(:response) { double }
subject { network.disable_ci '', '' }
 
Loading
Loading
Loading
Loading
@@ -139,7 +139,7 @@ describe Project do
end
end
 
describe :repo_url_with_auth do
describe '#repo_url_with_auth' do
let(:project) { FactoryGirl.create :project }
subject { project.repo_url_with_auth }
 
Loading
Loading
@@ -151,14 +151,14 @@ describe Project do
it { should include(project.gitlab_url[7..-1]) }
end
 
describe :search do
describe '.search' do
let!(:project) { FactoryGirl.create(:project, name: "foo") }
 
it { Project.search('fo').should include(project) }
it { Project.search('bar').should be_empty }
end
 
describe :any_runners do
describe '#any_runners' do
it "there are no runners available" do
project = FactoryGirl.create(:project)
project.any_runners?.should be_falsey
Loading
Loading
Loading
Loading
@@ -37,7 +37,7 @@ describe Runner do
end
end
 
describe :assign_to do
describe '#assign_to' do
let!(:project) { FactoryGirl.create :project }
let!(:shared_runner) { FactoryGirl.create(:shared_runner) }
 
Loading
Loading
Loading
Loading
@@ -41,7 +41,7 @@ describe Service do
@testable = @service.can_test?
end
 
describe :can_test do
describe '#can_test' do
it { @testable.should == true }
end
end
Loading
Loading
Loading
Loading
@@ -22,7 +22,7 @@ describe Variable do
subject.value = secret_value
end
 
describe :value do
describe '#value' do
it 'stores the encrypted value' do
subject.encrypted_value.should_not be_nil
end
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@ describe CreateCommitService do
let(:service) { CreateCommitService.new }
let(:project) { FactoryGirl.create(:project) }
describe :execute do
describe '#execute' do
context 'valid params' do
let(:commit) do
service.execute(project,
Loading
Loading
@@ -49,7 +49,7 @@ describe CreateCommitService do
end
end
 
describe :ci_skip? do
describe '#ci_skip?' do
it "skips builds creation if there is [ci skip] tag in commit message" do
commits = [{message: "some message[ci skip]"}]
commit = service.execute(project,
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@ describe CreateProjectService do
 
before { allow_any_instance_of(Network).to receive_messages(enable_ci: true) }
 
describe :execute do
describe '#execute' do
context 'valid params' do
let(:project) { service.execute(current_user, project_dump, 'http://localhost/projects/:project_id') }
 
Loading
Loading
Loading
Loading
@@ -5,7 +5,7 @@ describe CreateTriggerRequestService do
let(:project) { FactoryGirl.create :project }
let(:trigger) { FactoryGirl.create :trigger, project: project }
 
describe :execute do
describe '#execute' do
context 'valid params' do
subject { service.execute(project, trigger, 'master') }
 
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ describe EventService do
Event.destroy_all
end
describe :remove_project do
describe '#remove_project' do
it "creates event" do
EventService.new.remove_project(user, project)
 
Loading
Loading
@@ -16,7 +16,7 @@ describe EventService do
end
end
 
describe :create_project do
describe '#create_project' do
it "creates event" do
EventService.new.create_project(user, project)
 
Loading
Loading
@@ -24,11 +24,11 @@ describe EventService do
end
end
 
describe :change_project_settings do
describe '#change_project_settings' do
it "creates event" do
EventService.new.change_project_settings(user, project)
 
Event.last.description.should == "User \"root\" updated projects settings"
end
end
end
\ No newline at end of file
end
Loading
Loading
@@ -6,7 +6,7 @@ describe ImageForBuildService do
let(:commit) { FactoryGirl.create(:commit, project: project, ref: 'master') }
let(:build) { FactoryGirl.create(:build, commit: commit) }
 
describe :execute do
describe '#execute' do
before { build }
 
context 'branch name' do
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@ describe RegisterBuildService do
specific_runner.assign_to(project)
end
 
describe :execute do
describe '#execute' do
context 'runner follow tag list' do
it "picks build with the same tag" do
pending_build.tag_list = ["linux"]
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ describe WebHookService do
let (:build) { FactoryGirl.create :build, commit: commit }
let (:hook) { FactoryGirl.create :web_hook, project: project }
 
describe :execute do
describe '#execute' do
it "should execute successfully" do
stub_request(:post, hook.url).to_return(status: 200)
WebHookService.new.build_end(build).should be_truthy
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment