From c8f00575a9a15699e3bbf2c556803e561eeeb256 Mon Sep 17 00:00:00 2001 From: Takuto Asakura Date: Sat, 17 Aug 2024 15:14:43 +0900 Subject: [PATCH] refactor specs: better descriptions --- spec/config/buitin_spec.rb | 2 +- spec/config/texdoc_cnf_spec.rb | 2 +- spec/config/texdoc_dist_cnf_spec.rb | 2 +- spec/misc/errors_spec.rb | 2 +- spec/score/adjscore_spec.rb | 10 +++++----- spec/view/file_detection_spec.rb | 18 +++++++++--------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/spec/config/buitin_spec.rb b/spec/config/buitin_spec.rb index f0ed83e..e2457a4 100644 --- a/spec/config/buitin_spec.rb +++ b/spec/config/buitin_spec.rb @@ -1,7 +1,7 @@ require 'os' require 'spec_helper' -RSpec.describe "The build-in config", :type => :aruba do +RSpec.describe "The built-in configs", :type => :aruba do include_context "messages" context "if no other sources of config is set" do diff --git a/spec/config/texdoc_cnf_spec.rb b/spec/config/texdoc_cnf_spec.rb index 3628e40..ad6a31f 100644 --- a/spec/config/texdoc_cnf_spec.rb +++ b/spec/config/texdoc_cnf_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -RSpec.describe "Config files for Texdoc", :type => :aruba do +RSpec.describe "In config files for Texdoc", :type => :aruba do include_context "messages" include_context "texmf" diff --git a/spec/config/texdoc_dist_cnf_spec.rb b/spec/config/texdoc_dist_cnf_spec.rb index 8dfb18b..4987e3f 100644 --- a/spec/config/texdoc_dist_cnf_spec.rb +++ b/spec/config/texdoc_dist_cnf_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -RSpec.describe "The shipped texdoc.cnf", :type => :aruba do +RSpec.describe "In the shipped texdoc.cnf", :type => :aruba do include_context "messages" include_context "texmf" diff --git a/spec/misc/errors_spec.rb b/spec/misc/errors_spec.rb index 3a8591c..9bb155f 100644 --- a/spec/misc/errors_spec.rb +++ b/spec/misc/errors_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -RSpec.describe "Errors", :type => :aruba do +RSpec.describe "Errors:", :type => :aruba do include_context "messages" context "when any document for input cannot be found" do diff --git a/spec/score/adjscore_spec.rb b/spec/score/adjscore_spec.rb index 4ea310b..05bb140 100644 --- a/spec/score/adjscore_spec.rb +++ b/spec/score/adjscore_spec.rb @@ -1,10 +1,10 @@ require 'spec_helper' -RSpec.describe "Directive adjscore", :type => :aruba do +RSpec.describe "Score adjustment", :type => :aruba do include_context "messages" include_context "texmf" - context "global pattern score adjustment" do + context "for global pattern" do let(:config_content) { <<~EOF stopalias texlive-en @@ -26,7 +26,7 @@ end end - context "global pattern score adjustment for aliased name" do + context "for global pattern of an aliased name" do let(:config_content) { <<~EOF adjscore texlive-en = 7.3 @@ -47,7 +47,7 @@ end end - context "specific pattern score adjustment" do + context "for specific pattern" do let(:config_content) { <<~EOF adjscore(live) texlive-en = -2 @@ -68,7 +68,7 @@ end end - context "specific pattern score adjustment for unmatch name" do + context "for specific pattern of an unmatch name" do let(:config_content) { <<~EOF adjscore(live) texlive-en = -2 diff --git a/spec/view/file_detection_spec.rb b/spec/view/file_detection_spec.rb index 39a0329..8272b09 100644 --- a/spec/view/file_detection_spec.rb +++ b/spec/view/file_detection_spec.rb @@ -1,10 +1,10 @@ require 'spec_helper' -RSpec.describe "File detection for viewing", :type => :aruba do +RSpec.describe "File type", :type => :aruba do include_context "messages" include_context "texmf" - context "File *.html" do + context "*.html" do before(:each) do run_texdoc "-dview --just-view", sample_html end @@ -16,7 +16,7 @@ end end - context "File *.htm" do + context "*.htm" do before(:each) do run_texdoc "-dview --just-view", sample_htm end @@ -28,7 +28,7 @@ end end - context "File *.dvi" do + context "*.dvi" do before(:each) do run_texdoc "-dview --just-view", sample_dvi end @@ -40,7 +40,7 @@ end end - context "File *.md" do + context "*.md" do before(:each) do run_texdoc "-dview --just-view", sample_md end @@ -52,7 +52,7 @@ end end - context "File *.txt" do + context "*.txt" do before(:each) do run_texdoc "-dview --just-view", sample_txt end @@ -64,7 +64,7 @@ end end - context "File *.pdf" do + context "*.pdf" do before(:each) do run_texdoc "-dview --just-view", sample_pdf end @@ -76,7 +76,7 @@ end end - context "File *.ps" do + context "*.ps" do before(:each) do run_texdoc "-dview --just-view", sample_ps end @@ -88,7 +88,7 @@ end end - context "File *.tex" do + context "*.tex" do before(:each) do run_texdoc "-dview --just-view", sample_tex end