summaryrefslogtreecommitdiff
path: root/spec/models/release_spec.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /spec/models/release_spec.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'spec/models/release_spec.rb')
-rw-r--r--spec/models/release_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/models/release_spec.rb b/spec/models/release_spec.rb
index 157c96c1f65..823a2becbfe 100644
--- a/spec/models/release_spec.rb
+++ b/spec/models/release_spec.rb
@@ -1,4 +1,4 @@
-require 'rails_helper'
+require "rails_helper"
RSpec.describe Release do
let(:user) { create(:user) }
@@ -7,37 +7,37 @@ RSpec.describe Release do
it { expect(release).to be_valid }
- describe 'associations' do
+ describe "associations" do
it { is_expected.to belong_to(:project) }
- it { is_expected.to belong_to(:author).class_name('User') }
- it { is_expected.to have_many(:links).class_name('Releases::Link') }
+ it { is_expected.to belong_to(:author).class_name("User") }
+ it { is_expected.to have_many(:links).class_name("Releases::Link") }
end
- describe 'validation' do
+ describe "validation" do
it { is_expected.to validate_presence_of(:project) }
it { is_expected.to validate_presence_of(:description) }
end
- describe '#assets_count' do
+ describe "#assets_count" do
subject { release.assets_count }
- it 'returns the number of sources' do
+ it "returns the number of sources" do
is_expected.to eq(Releases::Source::FORMATS.count)
end
- context 'when a links exists' do
+ context "when a links exists" do
let!(:link) { create(:release_link, release: release) }
- it 'counts the link as an asset' do
+ it "counts the link as an asset" do
is_expected.to eq(1 + Releases::Source::FORMATS.count)
end
end
end
- describe '#sources' do
+ describe "#sources" do
subject { release.sources }
- it 'returns sources' do
+ it "returns sources" do
is_expected.to all(be_a(Releases::Source))
end
end