From cfe6cf7ca1874488d15b88cbd5a2ea5d1a7855f8 Mon Sep 17 00:00:00 2001 From: Brint O'Hearn Date: Sun, 15 May 2016 20:54:54 -0500 Subject: [PATCH] Rubocop fixes for test/test_doctor_command.rb --- .rubocop.yml | 1 - test/test_doctor_command.rb | 26 ++++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index b6e5b25a6..d14330d53 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -71,7 +71,6 @@ AllCops: - features/support/formatter.rb - features/support/helpers.rb - test/test_configuration.rb - - test/test_doctor_command.rb - test/test_document.rb - test/test_entry_filter.rb - test/test_excerpt.rb diff --git a/test/test_doctor_command.rb b/test/test_doctor_command.rb index dee50ac21..aa6cf1250 100644 --- a/test/test_doctor_command.rb +++ b/test/test_doctor_command.rb @@ -1,36 +1,38 @@ -require 'helper' -require 'jekyll/commands/doctor' +require "helper" +require "jekyll/commands/doctor" class TestDoctorCommand < JekyllUnitTest - context 'urls only differ by case' do + context "urls only differ by case" do setup do clear_dest end - should 'return success on a valid site/page' do + should "return success on a valid site/page" do @site = Site.new(Jekyll.configuration({ - "source" => File.join(source_dir, '/_urls_differ_by_case_valid'), + "source" => File.join(source_dir, "/_urls_differ_by_case_valid"), "destination" => dest_dir })) @site.process output = capture_stderr do - ret = Jekyll::Commands::Doctor.urls_only_differ_by_case(@site) - assert_equal false, ret + ret = Jekyll::Commands::Doctor.urls_only_differ_by_case(@site) + assert_equal false, ret end assert_equal "", output end - should 'return warning for pages only differing by case' do + should "return warning for pages only differing by case" do @site = Site.new(Jekyll.configuration({ - "source" => File.join(source_dir, '/_urls_differ_by_case_invalid'), + "source" => File.join(source_dir, "/_urls_differ_by_case_invalid"), "destination" => dest_dir })) @site.process output = capture_stderr do - ret = Jekyll::Commands::Doctor.urls_only_differ_by_case(@site) - assert_equal true, ret + ret = Jekyll::Commands::Doctor.urls_only_differ_by_case(@site) + assert_equal true, ret end - assert_includes output, "Warning: The following URLs only differ by case. On a case-insensitive file system one of the URLs will be overwritten by the other: #{dest_dir}/about/index.html, #{dest_dir}/About/index.html" + assert_includes output, "Warning: The following URLs only differ by case. "\ + "On a case-insensitive file system one of the URLs will be overwritten by the "\ + "other: #{dest_dir}/about/index.html, #{dest_dir}/About/index.html" end end end