From 28cc024648e79dc51113d89470e736bbe1cf6a52 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 6 Dec 2018 15:37:41 +0530 Subject: [PATCH] Correct RuboCop offenses in spec files (#319) Merge pull request 319 --- spec/jekyll_seo_tag/author_drop_spec.rb | 2 +- spec/jekyll_seo_tag/drop_spec.rb | 2 +- spec/jekyll_seo_tag/json_ld_drop_spec.rb | 6 +++--- spec/jekyll_seo_tag_integration_spec.rb | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/spec/jekyll_seo_tag/author_drop_spec.rb b/spec/jekyll_seo_tag/author_drop_spec.rb index e5cc991..7756715 100644 --- a/spec/jekyll_seo_tag/author_drop_spec.rb +++ b/spec/jekyll_seo_tag/author_drop_spec.rb @@ -50,7 +50,7 @@ RSpec.describe Jekyll::SeoTag::AuthorDrop do end end - %i[with without].each do |site_data_type| + [:with, :without].each do |site_data_type| context "#{site_data_type} site.author data" do let(:data) do if site_data_type == :with diff --git a/spec/jekyll_seo_tag/drop_spec.rb b/spec/jekyll_seo_tag/drop_spec.rb index 5099e17..172f581 100644 --- a/spec/jekyll_seo_tag/drop_spec.rb +++ b/spec/jekyll_seo_tag/drop_spec.rb @@ -320,7 +320,7 @@ RSpec.describe Jekyll::SeoTag::Drop do end context "the about page" do - let(:page) { make_page({ "permalink" => "/about/" }) } + let(:page) { make_page("permalink" => "/about/") } it "is a website" do expect(subject.type).to eql("WebSite") diff --git a/spec/jekyll_seo_tag/json_ld_drop_spec.rb b/spec/jekyll_seo_tag/json_ld_drop_spec.rb index fd83c1b..68bd275 100644 --- a/spec/jekyll_seo_tag/json_ld_drop_spec.rb +++ b/spec/jekyll_seo_tag/json_ld_drop_spec.rb @@ -91,12 +91,12 @@ RSpec.describe Jekyll::SeoTag::JSONLDDrop do it "returns the image as a hash" do expect(subject).to have_key("image") expect(subject["image"]).to be_a(Hash) - expect(subject["image"]).to eql({ + expect(subject["image"]).to eql( "@type" => "imageObject", "url" => "/image", "height" => 5, - "width" => 10, - }) + "width" => 10 + ) end end end diff --git a/spec/jekyll_seo_tag_integration_spec.rb b/spec/jekyll_seo_tag_integration_spec.rb index 8c63c79..276c665 100755 --- a/spec/jekyll_seo_tag_integration_spec.rb +++ b/spec/jekyll_seo_tag_integration_spec.rb @@ -299,16 +299,16 @@ RSpec.describe Jekyll::SeoTag do it "minifies the output" do version = Jekyll::SeoTag::VERSION - expected = <<-EOS - -Foo - - - - - - -EOS + expected = <<~HTML + + Foo + + + + + + + HTML expect(output).to match(expected) end end