summaryrefslogtreecommitdiff
path: root/spec/lib/charts_spec.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-08-30 19:05:24 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-08-30 19:05:24 -0400
commit74b995d17b095e326177e7c0e452f0df3a1ab885 (patch)
tree36d32b84401cf78f5db69feb9f4ab2c2d357c3f7 /spec/lib/charts_spec.rb
parent976bffef4b68ad68c528189693f4f0feed5eadaa (diff)
downloadgitlab-ci-74b995d17b095e326177e7c0e452f0df3a1ab885.tar.gz
Use `described_class` where appropriate
Diffstat (limited to 'spec/lib/charts_spec.rb')
-rw-r--r--spec/lib/charts_spec.rb21
1 files changed, 9 insertions, 12 deletions
diff --git a/spec/lib/charts_spec.rb b/spec/lib/charts_spec.rb
index d3c78b6..60d1b5a 100644
--- a/spec/lib/charts_spec.rb
+++ b/spec/lib/charts_spec.rb
@@ -1,17 +1,14 @@
require 'spec_helper'
-describe "Charts" do
-
- context "build_times" do
- before do
- @project = FactoryGirl.create(:project)
- @commit = FactoryGirl.create(:commit, project: @project)
- FactoryGirl.create(:build, commit: @commit)
- end
+describe Charts::BuildTime do
+ before do
+ @project = FactoryGirl.create(:project)
+ @commit = FactoryGirl.create(:commit, project: @project)
+ FactoryGirl.create(:build, commit: @commit)
+ end
- it 'should return build times in minutes' do
- chart = Charts::BuildTime.new(@project)
- chart.build_times.should eq [2]
- end
+ it 'should return build times in minutes' do
+ chart = described_class.new(@project)
+ chart.build_times.should eq [2]
end
end