Skip to content

Commit

Permalink
delint (safe)
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Aug 15, 2024
1 parent 5561fdf commit d4c14e0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions spec/accessibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
visit(path)
end

it "meets WCAG 2.1" do
it 'meets WCAG 2.1' do
expect(page).to be_axe_clean
.according_to(*required_a11y_standards)
.skipping(*skipped_rules)
.excluding(*excluded_elements)
end

it "meets WCAG 2.2" do
it 'meets WCAG 2.2' do
expect(page).to be_axe_clean
.according_to(*complete_a11y_standards)
.skipping(*skipped_rules)
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
require 'axe-rspec'
require 'axe-capybara'

require_relative './support/jekyll'
require_relative 'support/jekyll'

# Used to set the path for a local webserver.
# Update this if you move this file.
Expand All @@ -57,7 +57,7 @@
end

Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
path = example.example_group.top_level_description.gsub(/^\//, '').gsub('/', '-').gsub(' is accessible', '')
path = example.example_group.top_level_description.gsub(%r{^/}, '').gsub('/', '-').gsub(' is accessible', '')
standards = example.description.split(' ').last
"tmp/capybara/screenshot_#{page}_#{standards}"
end
Expand Down
4 changes: 1 addition & 3 deletions spec/support/jekyll.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

require 'jekyll'

# Tools to build / compile the Jekyll site and extract the sitemap
Expand All @@ -8,7 +7,7 @@ def site_config
# Consider forcing the desination folder
# Override the local URL too? Would it break the sitemap?
# Note: Config keys must be strings and thus use => style hashes.
@site_config ||= Jekyll.configuration({'sass' => { 'quiet_deps' => true }})
@site_config ||= Jekyll.configuration({ 'sass' => { 'quiet_deps' => true } })
end

def build_jekyll_site!
Expand All @@ -33,7 +32,6 @@ def load_sitemap
end.sort
end


# Start a local Rack server
# https://nts.strzibny.name/how-to-test-static-sites-with-rspec-capybara-and-webkit/
class StaticSite
Expand Down

0 comments on commit d4c14e0

Please sign in to comment.