Rubocop fixes for test/test_doctor_command.rb

This commit is contained in:
Brint O'Hearn 2016-05-15 20:54:54 -05:00
parent 454a1e415c
commit cfe6cf7ca1
2 changed files with 14 additions and 13 deletions

View File

@ -71,7 +71,6 @@ AllCops:
- features/support/formatter.rb - features/support/formatter.rb
- features/support/helpers.rb - features/support/helpers.rb
- test/test_configuration.rb - test/test_configuration.rb
- test/test_doctor_command.rb
- test/test_document.rb - test/test_document.rb
- test/test_entry_filter.rb - test/test_entry_filter.rb
- test/test_excerpt.rb - test/test_excerpt.rb

View File

@ -1,15 +1,15 @@
require 'helper' require "helper"
require 'jekyll/commands/doctor' require "jekyll/commands/doctor"
class TestDoctorCommand < JekyllUnitTest class TestDoctorCommand < JekyllUnitTest
context 'urls only differ by case' do context "urls only differ by case" do
setup do setup do
clear_dest clear_dest
end end
should 'return success on a valid site/page' do should "return success on a valid site/page" do
@site = Site.new(Jekyll.configuration({ @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 "destination" => dest_dir
})) }))
@site.process @site.process
@ -20,9 +20,9 @@ class TestDoctorCommand < JekyllUnitTest
assert_equal "", output assert_equal "", output
end 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({ @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 "destination" => dest_dir
})) }))
@site.process @site.process
@ -30,7 +30,9 @@ class TestDoctorCommand < JekyllUnitTest
ret = Jekyll::Commands::Doctor.urls_only_differ_by_case(@site) ret = Jekyll::Commands::Doctor.urls_only_differ_by_case(@site)
assert_equal true, ret assert_equal true, ret
end 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 end
end end