From f85ec381137c6838600b16c353ff9dba3a05452c Mon Sep 17 00:00:00 2001 From: Austin Ziegler Date: Thu, 23 Dec 2021 10:44:44 -0500 Subject: standardrb --only Style/StringLiterals --fix --- spec/traverse_sequences_spec.rb | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'spec/traverse_sequences_spec.rb') diff --git a/spec/traverse_sequences_spec.rb b/spec/traverse_sequences_spec.rb index b185e1d..3bad13e 100644 --- a/spec/traverse_sequences_spec.rb +++ b/spec/traverse_sequences_spec.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' +require "spec_helper" -describe 'Diff::LCS.traverse_sequences' do - describe 'callback with no finishers' do - describe 'over (seq1, seq2)' do +describe "Diff::LCS.traverse_sequences" do + describe "callback with no finishers" do + describe "over (seq1, seq2)" do before(:each) do @callback_s1_s2 = simple_callback_no_finishers Diff::LCS.traverse_sequences(seq1, seq2, @callback_s1_s2) @@ -13,27 +13,27 @@ describe 'Diff::LCS.traverse_sequences' do Diff::LCS.traverse_sequences(seq2, seq1, @callback_s2_s1) end - it 'has the correct LCS result on left-matches' do + it "has the correct LCS result on left-matches" do expect(@callback_s1_s2.matched_a).to eq(correct_lcs) expect(@callback_s2_s1.matched_a).to eq(correct_lcs) end - it 'has the correct LCS result on right-matches' do + it "has the correct LCS result on right-matches" do expect(@callback_s1_s2.matched_b).to eq(correct_lcs) expect(@callback_s2_s1.matched_b).to eq(correct_lcs) end - it 'has the correct skipped sequences with the left sequence' do + it "has the correct skipped sequences with the left sequence" do expect(@callback_s1_s2.discards_a).to eq(skipped_seq1) expect(@callback_s2_s1.discards_a).to eq(skipped_seq2) end - it 'has the correct skipped sequences with the right sequence' do + it "has the correct skipped sequences with the right sequence" do expect(@callback_s1_s2.discards_b).to eq(skipped_seq2) expect(@callback_s2_s1.discards_b).to eq(skipped_seq1) end - it 'does not have anything done markers from the left or right sequences' do + it "does not have anything done markers from the left or right sequences" do expect(@callback_s1_s2.done_a).to be_empty expect(@callback_s1_s2.done_b).to be_empty expect(@callback_s2_s1.done_a).to be_empty @@ -41,64 +41,64 @@ describe 'Diff::LCS.traverse_sequences' do end end - describe 'over (hello, hello)' do + describe "over (hello, hello)" do before(:each) do @callback = simple_callback_no_finishers Diff::LCS.traverse_sequences(hello, hello, @callback) end - it 'has the correct LCS result on left-matches' do + it "has the correct LCS result on left-matches" do expect(@callback.matched_a).to eq(hello.split(//)) end - it 'has the correct LCS result on right-matches' do + it "has the correct LCS result on right-matches" do expect(@callback.matched_b).to eq(hello.split(//)) end - it 'has the correct skipped sequences with the left sequence', :only => true do + it "has the correct skipped sequences with the left sequence", :only => true do expect(@callback.discards_a).to be_empty end - it 'has the correct skipped sequences with the right sequence' do + it "has the correct skipped sequences with the right sequence" do expect(@callback.discards_b).to be_empty end - it 'does not have anything done markers from the left or right sequences' do + it "does not have anything done markers from the left or right sequences" do expect(@callback.done_a).to be_empty expect(@callback.done_b).to be_empty end end - describe 'over (hello_ary, hello_ary)' do + describe "over (hello_ary, hello_ary)" do before(:each) do @callback = simple_callback_no_finishers Diff::LCS.traverse_sequences(hello_ary, hello_ary, @callback) end - it 'has the correct LCS result on left-matches' do + it "has the correct LCS result on left-matches" do expect(@callback.matched_a).to eq(hello_ary) end - it 'has the correct LCS result on right-matches' do + it "has the correct LCS result on right-matches" do expect(@callback.matched_b).to eq(hello_ary) end - it 'has the correct skipped sequences with the left sequence' do + it "has the correct skipped sequences with the left sequence" do expect(@callback.discards_a).to be_empty end - it 'has the correct skipped sequences with the right sequence' do + it "has the correct skipped sequences with the right sequence" do expect(@callback.discards_b).to be_empty end - it 'does not have anything done markers from the left or right sequences' do + it "does not have anything done markers from the left or right sequences" do expect(@callback.done_a).to be_empty expect(@callback.done_b).to be_empty end end end - describe 'callback with finisher' do + describe "callback with finisher" do before(:each) do @callback_s1_s2 = simple_callback Diff::LCS.traverse_sequences(seq1, seq2, @callback_s1_s2) @@ -106,32 +106,32 @@ describe 'Diff::LCS.traverse_sequences' do Diff::LCS.traverse_sequences(seq2, seq1, @callback_s2_s1) end - it 'has the correct LCS result on left-matches' do + it "has the correct LCS result on left-matches" do expect(@callback_s1_s2.matched_a).to eq(correct_lcs) expect(@callback_s2_s1.matched_a).to eq(correct_lcs) end - it 'has the correct LCS result on right-matches' do + it "has the correct LCS result on right-matches" do expect(@callback_s1_s2.matched_b).to eq(correct_lcs) expect(@callback_s2_s1.matched_b).to eq(correct_lcs) end - it 'has the correct skipped sequences for the left sequence' do + it "has the correct skipped sequences for the left sequence" do expect(@callback_s1_s2.discards_a).to eq(skipped_seq1) expect(@callback_s2_s1.discards_a).to eq(skipped_seq2) end - it 'has the correct skipped sequences for the right sequence' do + it "has the correct skipped sequences for the right sequence" do expect(@callback_s1_s2.discards_b).to eq(skipped_seq2) expect(@callback_s2_s1.discards_b).to eq(skipped_seq1) end - it 'has done markers differently-sized sequences' do - expect(@callback_s1_s2.done_a).to eq([['p', 9, 't', 11]]) + it "has done markers differently-sized sequences" do + expect(@callback_s1_s2.done_a).to eq([["p", 9, "t", 11]]) expect(@callback_s1_s2.done_b).to be_empty expect(@callback_s2_s1.done_a).to be_empty - expect(@callback_s2_s1.done_b).to eq([['t', 11, 'p', 9]]) + expect(@callback_s2_s1.done_b).to eq([["t", 11, "p", 9]]) end end end -- cgit v1.2.1 From 927b9b3c935f08a1611059e81b411c2ee2ff9724 Mon Sep 17 00:00:00 2001 From: Austin Ziegler Date: Thu, 23 Dec 2021 11:13:21 -0500 Subject: Ignore Style/HashSyntax --- spec/traverse_sequences_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/traverse_sequences_spec.rb') diff --git a/spec/traverse_sequences_spec.rb b/spec/traverse_sequences_spec.rb index 3bad13e..ed40100 100644 --- a/spec/traverse_sequences_spec.rb +++ b/spec/traverse_sequences_spec.rb @@ -55,7 +55,7 @@ describe "Diff::LCS.traverse_sequences" do expect(@callback.matched_b).to eq(hello.split(//)) end - it "has the correct skipped sequences with the left sequence", :only => true do + it "has the correct skipped sequences with the left sequence" do expect(@callback.discards_a).to be_empty end -- cgit v1.2.1 From f7b3ef0aa1186f3e34c3d20684fa955cbe9fef91 Mon Sep 17 00:00:00 2001 From: Austin Ziegler Date: Thu, 23 Dec 2021 11:28:46 -0500 Subject: standardrb --only Style/StringChars --- spec/traverse_sequences_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/traverse_sequences_spec.rb') diff --git a/spec/traverse_sequences_spec.rb b/spec/traverse_sequences_spec.rb index ed40100..8e9928f 100644 --- a/spec/traverse_sequences_spec.rb +++ b/spec/traverse_sequences_spec.rb @@ -48,11 +48,11 @@ describe "Diff::LCS.traverse_sequences" do end it "has the correct LCS result on left-matches" do - expect(@callback.matched_a).to eq(hello.split(//)) + expect(@callback.matched_a).to eq(hello.chars) end it "has the correct LCS result on right-matches" do - expect(@callback.matched_b).to eq(hello.split(//)) + expect(@callback.matched_b).to eq(hello.chars) end it "has the correct skipped sequences with the left sequence" do -- cgit v1.2.1