Skip to content

Commit d642409

Browse files
craigmcnamaraclaude
andcommitted
Fix RuboCop style violations in accessibility specs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7a7d0a2 commit d642409

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

spec/prawn/accessibility_spec.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
it 'returns false for unmarked documents' do
1515
plain = Prawn::Document.new
16-
expect(plain).not_to be_tagged
16+
expect(plain).to_not(be_tagged)
1717
end
1818
end
1919

@@ -27,7 +27,7 @@
2727
describe '#structure' do
2828
it 'wraps content in a structure element' do
2929
pdf.structure(:H1) do
30-
pdf.text 'Title'
30+
pdf.text('Title')
3131
end
3232
output = pdf.render
3333

@@ -37,7 +37,7 @@
3737

3838
it 'emits BDC/EMC in the content stream' do
3939
pdf.structure(:P) do
40-
pdf.text 'Hello'
40+
pdf.text('Hello')
4141
end
4242
output = pdf.render
4343

@@ -48,19 +48,19 @@
4848
it 'is a no-op for untagged documents' do
4949
plain = Prawn::Document.new
5050
plain.structure(:P) do
51-
plain.text 'Hello'
51+
plain.text('Hello')
5252
end
5353
output = plain.render
5454

55-
expect(output).not_to include('/StructTreeRoot')
55+
expect(output).to_not(include('/StructTreeRoot'))
5656
end
5757
end
5858

5959
describe '#structure_container' do
6060
it 'creates a parent structure without marking content directly' do
6161
pdf.structure_container(:Table) do
6262
pdf.structure(:TD) do
63-
pdf.text 'Cell'
63+
pdf.text('Cell')
6464
end
6565
end
6666
output = pdf.render
@@ -74,7 +74,7 @@
7474
describe '#artifact' do
7575
it 'wraps content in Artifact markers' do
7676
pdf.artifact do
77-
pdf.text 'Page 1'
77+
pdf.text('Page 1')
7878
end
7979
output = pdf.render
8080

@@ -84,7 +84,7 @@
8484

8585
it 'supports artifact type' do
8686
pdf.artifact(type: :Pagination) do
87-
pdf.text 'Page 1'
87+
pdf.text('Page 1')
8888
end
8989
output = pdf.render
9090

@@ -95,11 +95,11 @@
9595
it 'is a no-op for untagged documents' do
9696
plain = Prawn::Document.new
9797
plain.artifact do
98-
plain.text 'Footer'
98+
plain.text('Footer')
9999
end
100100
output = plain.render
101101

102-
expect(output).not_to include('/Artifact')
102+
expect(output).to_not(include('/Artifact'))
103103
end
104104
end
105105

@@ -134,7 +134,7 @@
134134

135135
it 'supports block form' do
136136
pdf.paragraph do
137-
pdf.text 'Complex paragraph'
137+
pdf.text('Complex paragraph')
138138
end
139139
output = pdf.render
140140

@@ -146,7 +146,7 @@
146146
describe 'ActualText' do
147147
it 'passes ActualText to structure elements' do
148148
pdf.structure(:Span, ActualText: 'required') do
149-
pdf.text '*'
149+
pdf.text('*')
150150
end
151151
output = pdf.render
152152

@@ -155,10 +155,10 @@
155155

156156
it 'allows ActualText for checkbox indicators' do
157157
pdf.structure(:Span, ActualText: 'Selected') do
158-
pdf.text 'X'
158+
pdf.text('X')
159159
end
160160
pdf.structure(:Span, ActualText: 'Not selected') do
161-
pdf.text ' '
161+
pdf.text(' ')
162162
end
163163
output = pdf.render
164164

@@ -169,7 +169,7 @@
169169
describe '#figure' do
170170
it 'wraps content with alt text' do
171171
pdf.figure(alt_text: 'A logo') do
172-
pdf.text 'IMAGE PLACEHOLDER'
172+
pdf.text('IMAGE PLACEHOLDER')
173173
end
174174
output = pdf.render
175175

@@ -184,7 +184,7 @@
184184
pdf.paragraph('This is a test paragraph.')
185185

186186
pdf.artifact(type: :Pagination) do
187-
pdf.text 'Page 1 of 1'
187+
pdf.text('Page 1 of 1')
188188
end
189189

190190
output = pdf.render

0 commit comments

Comments
 (0)