Skip to content

Commit c870e6c

Browse files
committed
fix specs
1 parent efc0153 commit c870e6c

File tree

6 files changed

+11
-21
lines changed

6 files changed

+11
-21
lines changed

examples/render-mandoc/docs/download.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Automatically generated by Pandoc 3.2
22
.\"
3-
.TH "download" "1" "July 2025" "Version 0.1.0" "Sample application"
3+
.TH "download" "1" "August 2025" "Version 0.1.0" "Sample application"
44
.SH NAME
55
\f[B]download\f[R] \- Sample application
66
.SH SYNOPSIS

examples/render-mandoc/docs/download.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% download(1) Version 0.1.0 | Sample application
22
% Lana Lang
3-
% July 2025
3+
% August 2025
44

55
NAME
66
==================================================

lib/bashly/script/wrapper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def base_code
2727
end
2828

2929
def clean_code(script)
30-
script.remove_private_comments
31-
formatter = Formatter.new script, mode: Settings.formatter
30+
result = script.remove_private_comments
31+
formatter = Formatter.new result, mode: Settings.formatter
3232
formatter.formatted_script
3333
end
3434

spec/approvals/examples/render-mandoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ ISSUE TRACKER
4444
AUTHORS
4545
Lana Lang.
4646

47-
Version 0.1.0 July 2025 download(1)
47+
Version 0.1.0 August 2025 download(1)

spec/approvals/examples/stacktrace

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ Examples:
5151

5252
Stack trace:
5353
from ./download:15 in `root_command`
54-
from ./download:260 in `run`
55-
from ./download:266 in `main`
54+
from ./download:259 in `run`
55+
from ./download:265 in `main`

spec/bashly/extensions/string_spec.rb

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -125,21 +125,11 @@
125125
end
126126
end
127127

128-
describe '#lint' do
129-
context 'with a string that contains multiple consecutive newlines' do
130-
subject { "one\n two\n \n three\n \n \nfour\n\n\n\n" }
128+
describe '#remove_private_comments' do
129+
subject { "this is important\n## SECRET\n ## ANOTHER SECRET\n also important\n" }
131130

132-
it 'replaces two or more newlines with two newlines' do
133-
expect(subject.lint).to eq "one\n two\n\n three\n\nfour\n\n"
134-
end
135-
end
136-
137-
context 'with a string that contains double-hash comments' do
138-
subject { "this is important\n## SECRET\n ## ANOTHER SECRET\n also important\n" }
139-
140-
it 'removes these comments' do
141-
expect(subject.lint).to eq "this is important\n also important\n"
142-
end
131+
it 'removes these comments' do
132+
expect(subject.remove_private_comments).to eq "this is important\n also important\n"
143133
end
144134
end
145135

0 commit comments

Comments
 (0)