diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/build_spec.rb | 42 | ||||
-rw-r--r-- | spec/models/commit_spec.rb | 18 | ||||
-rw-r--r-- | spec/models/network_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/runner_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/service_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/variable_spec.rb | 2 |
7 files changed, 38 insertions, 38 deletions
diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index ea6b08a..8a085c1 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -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 } @@ -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 @@ -63,7 +63,7 @@ describe Build do end end - describe :started? do + describe '#started?' do subject { build.started? } context 'without started_at' do @@ -89,7 +89,7 @@ describe Build do end end - describe :active? do + describe '#active?' do subject { build.active? } %w(pending running).each do |state| @@ -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| @@ -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 @@ -165,7 +165,7 @@ describe Build do end end - describe :trace do + describe '#trace' do subject { build.trace_html } it { should be_empty } @@ -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) } @@ -210,7 +210,7 @@ describe Build do end end - describe :options do + describe '#options' do let(:options) { { :image => "ruby:2.1", @@ -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') } @@ -304,7 +304,7 @@ describe Build do end end - describe :variables do + describe '#variables' do context 'returns variables' do subject { build.variables } diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index e0dd6fb..6e1d91d 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/spec/models/network_spec.rb b/spec/models/network_spec.rb index dc8f89d..a527338 100644 --- a/spec/models/network_spec.rb +++ b/spec/models/network_spec.rb @@ -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 @@ -27,7 +27,7 @@ describe Network do end end - describe :disable_ci do + describe '#disable_ci' do let(:response) { double } subject { network.disable_ci '', '' } diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index ee8719f..82e30c7 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -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 } @@ -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 diff --git a/spec/models/runner_spec.rb b/spec/models/runner_spec.rb index 4ccad87..061fba8 100644 --- a/spec/models/runner_spec.rb +++ b/spec/models/runner_spec.rb @@ -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) } diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb index 22a49e1..8a275bf 100644 --- a/spec/models/service_spec.rb +++ b/spec/models/service_spec.rb @@ -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 diff --git a/spec/models/variable_spec.rb b/spec/models/variable_spec.rb index 4575115..1ecb960 100644 --- a/spec/models/variable_spec.rb +++ b/spec/models/variable_spec.rb @@ -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 |