summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2021-12-23 11:28:46 -0500
committerAustin Ziegler <austin@zieglers.ca>2022-07-04 20:26:10 -0400
commitf7b3ef0aa1186f3e34c3d20684fa955cbe9fef91 (patch)
tree39286332d353f1deb85c7ee56b962a4b38e886a4
parenta7e532ead1780f94d11bf42ac613b8428d808597 (diff)
downloaddiff-lcs-f7b3ef0aa1186f3e34c3d20684fa955cbe9fef91.tar.gz
standardrb --only Style/StringChars
-rw-r--r--spec/lcs_spec.rb2
-rw-r--r--spec/traverse_sequences_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/lcs_spec.rb b/spec/lcs_spec.rb
index e3643dd..c17f22f 100644
--- a/spec/lcs_spec.rb
+++ b/spec/lcs_spec.rb
@@ -47,7 +47,7 @@ describe Diff::LCS, ".LCS" do
end
it "returns %W(h e l l o) with (hello, hello)" do
- expect(Diff::LCS.LCS(hello, hello)).to eq(hello.split(//))
+ expect(Diff::LCS.LCS(hello, hello)).to eq(hello.chars)
end
it "returns hello_ary with (hello_ary, hello_ary)" do
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