word_count_analyzer 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4196889f5b1468ba043a02237ae4226c6696e257
|
4
|
+
data.tar.gz: 908da31fc4e6aca7a3f36c059d8a8aac497199f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 701cff3bcf553ccb6850484bb5095dcb6785e71e562afbb30063a6d60568718ae1c15a2a85993573009c0b299b4aaad9573cb34848e220d1d1c8a9e5913be6cf
|
7
|
+
data.tar.gz: 02348ebdd3b8d5ab7dcc40522b9a9d9925d462238f93427acbb5468e3921332b8876cf815e0456ec5ab6d43cc23c76264ece4e3c24e2a6e54162b45b39aee582
|
@@ -10,7 +10,7 @@ module WordCountAnalyzer
|
|
10
10
|
UNDERSCORE_REGEX = /(?<=\s)_{2,}(\s|$)|\A_{2,}(?=(\s|$))/
|
11
11
|
|
12
12
|
# Rubular: http://rubular.com/r/FexKxGUuIe
|
13
|
-
STRAY_PUNCTUATION_REGEX = /(?<=\s)[[:punct:]](?=(\s|$))|(?<=\s)\|(?=(\s|$))/
|
13
|
+
STRAY_PUNCTUATION_REGEX = /(?<=\s|\A)[[:punct:]](?=(\s|$))|(?<=\s|\A)\|(?=(\s|$))/
|
14
14
|
|
15
15
|
attr_reader :string
|
16
16
|
def initialize(string:)
|
@@ -55,6 +55,12 @@ RSpec.describe WordCountAnalyzer::Punctuation do
|
|
55
55
|
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
56
56
|
expect(ws.stray_punctuation_occurences).to eq(0)
|
57
57
|
end
|
58
|
+
|
59
|
+
it 'returns the number of stray punctuation occurences #003' do
|
60
|
+
string = "."
|
61
|
+
ws = WordCountAnalyzer::Punctuation.new(string: string)
|
62
|
+
expect(ws.stray_punctuation_occurences).to eq(1)
|
63
|
+
end
|
58
64
|
end
|
59
65
|
|
60
66
|
context '#replace_dotted_line' do
|