From 62d7990b9bb30cf33ed87017c5c633d1cccc75c2 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Thu, 28 Feb 2019 19:57:34 +0100 Subject: Ran standardrb --fix on the whole codebase 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_. --- spec/presenters/blob_presenter_spec.rb | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'spec/presenters/blob_presenter_spec.rb') diff --git a/spec/presenters/blob_presenter_spec.rb b/spec/presenters/blob_presenter_spec.rb index bb1db9a3d51..cbaf99482a1 100644 --- a/spec/presenters/blob_presenter_spec.rb +++ b/spec/presenters/blob_presenter_spec.rb @@ -1,41 +1,41 @@ # frozen_string_literal: true -require 'spec_helper' +require "spec_helper" describe BlobPresenter, :seed_helper do - let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') } + let(:repository) { Gitlab::Git::Repository.new("default", TEST_REPO_PATH, "", "group/project") } let(:git_blob) do Gitlab::Git::Blob.find( repository, - 'fa1b1e6c004a68b7d8763b86455da9e6b23e36d6', - 'files/ruby/regex.rb' + "fa1b1e6c004a68b7d8763b86455da9e6b23e36d6", + "files/ruby/regex.rb" ) end let(:blob) { Blob.new(git_blob) } - describe '#highlight' do + describe "#highlight" do subject { described_class.new(blob) } - it 'returns highlighted content' do - expect(Gitlab::Highlight).to receive(:highlight).with('files/ruby/regex.rb', git_blob.data, plain: nil, language: nil) + it "returns highlighted content" do + expect(Gitlab::Highlight).to receive(:highlight).with("files/ruby/regex.rb", git_blob.data, plain: nil, language: nil) subject.highlight end - it 'returns plain content when :plain is true' do - expect(Gitlab::Highlight).to receive(:highlight).with('files/ruby/regex.rb', git_blob.data, plain: true, language: nil) + it "returns plain content when :plain is true" do + expect(Gitlab::Highlight).to receive(:highlight).with("files/ruby/regex.rb", git_blob.data, plain: true, language: nil) subject.highlight(plain: true) end - context 'gitlab-language contains a match' do + context "gitlab-language contains a match" do before do - allow(blob).to receive(:language_from_gitattributes).and_return('ruby') + allow(blob).to receive(:language_from_gitattributes).and_return("ruby") end - it 'passes language to inner call' do - expect(Gitlab::Highlight).to receive(:highlight).with('files/ruby/regex.rb', git_blob.data, plain: nil, language: 'ruby') + it "passes language to inner call" do + expect(Gitlab::Highlight).to receive(:highlight).with("files/ruby/regex.rb", git_blob.data, plain: nil, language: "ruby") subject.highlight end -- cgit v1.2.1