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/routing/environments_spec.rb | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'spec/routing/environments_spec.rb') diff --git a/spec/routing/environments_spec.rb b/spec/routing/environments_spec.rb index aacbe300966..a6843c557f5 100644 --- a/spec/routing/environments_spec.rb +++ b/spec/routing/environments_spec.rb @@ -1,36 +1,36 @@ -require 'spec_helper' +require "spec_helper" -describe 'environments routing' do +describe "environments routing" do let(:project) { create(:project) } let(:environment) do create(:environment, project: project, - name: 'staging-1.0/review') + name: "staging-1.0/review") end let(:environments_route) do "#{project.namespace.name}/#{project.name}/environments/" end - describe 'routing environment folders' do - context 'when using JSON format' do - it 'correctly matches environment name and JSON format' do - expect(get_folder('staging-1.0.json')) - .to route_to(*folder_action(id: 'staging-1.0', format: 'json')) + describe "routing environment folders" do + context "when using JSON format" do + it "correctly matches environment name and JSON format" do + expect(get_folder("staging-1.0.json")) + .to route_to(*folder_action(id: "staging-1.0", format: "json")) end end - context 'when using HTML format' do - it 'correctly matches environment name and HTML format' do - expect(get_folder('staging-1.0.html')) - .to route_to(*folder_action(id: 'staging-1.0', format: 'html')) + context "when using HTML format" do + it "correctly matches environment name and HTML format" do + expect(get_folder("staging-1.0.html")) + .to route_to(*folder_action(id: "staging-1.0", format: "html")) end end - context 'when using implicit format' do - it 'correctly matches environment name' do - expect(get_folder('staging-1.0')) - .to route_to(*folder_action(id: 'staging-1.0')) + context "when using implicit format" do + it "correctly matches environment name" do + expect(get_folder("staging-1.0")) + .to route_to(*folder_action(id: "staging-1.0")) end end end @@ -41,9 +41,9 @@ describe 'environments routing' do end def folder_action(**opts) - options = { namespace_id: project.namespace.name, - project_id: project.name } + options = {namespace_id: project.namespace.name, + project_id: project.name,} - ['projects/environments#folder', options.merge(opts)] + ["projects/environments#folder", options.merge(opts)] end end -- cgit v1.2.1