From 1a6c0580af68d6666675a0265be2645387464514 Mon Sep 17 00:00:00 2001 From: Steve Polito Date: Mon, 8 Apr 2024 05:47:38 -0400 Subject: [PATCH] AccessibilityGenerator: Update gem declaration In order to avoid the following failure in CI, we need to load the latest build (not release) of capybara_accessibility_audit. ``` NoMethodError: undefined method `configure' for module RSpec (NoMethodError) RSpec.configure do |config| ``` For reference, [this commit][] fixes the issue. [this commit]: https://github.com/thoughtbot/capybara_accessibility_audit/commit/0ee6922ef19a391fb617778ef730af30b2680759 --- lib/generators/suspenders/accessibility_generator.rb | 2 +- test/generators/suspenders/accessibility_generator_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/generators/suspenders/accessibility_generator.rb b/lib/generators/suspenders/accessibility_generator.rb index 85b91a553..ea6da16b6 100644 --- a/lib/generators/suspenders/accessibility_generator.rb +++ b/lib/generators/suspenders/accessibility_generator.rb @@ -7,7 +7,7 @@ class AccessibilityGenerator < Rails::Generators::Base def add_capybara_gems gem_group :test do - gem "capybara_accessibility_audit" + gem "capybara_accessibility_audit", github: "thoughtbot/capybara_accessibility_audit" gem "capybara_accessible_selectors", github: "citizensadvice/capybara_accessible_selectors" end Bundler.with_unbundled_env { run "bundle install" } diff --git a/test/generators/suspenders/accessibility_generator_test.rb b/test/generators/suspenders/accessibility_generator_test.rb index c8ca95ef1..004760d77 100644 --- a/test/generators/suspenders/accessibility_generator_test.rb +++ b/test/generators/suspenders/accessibility_generator_test.rb @@ -29,7 +29,7 @@ class AccessibilityGeneratorTest < Rails::Generators::TestCase run_generator assert_file app_root("Gemfile") do |file| - assert_match "capybara_accessibility_audit", file + assert_match(/"capybara_accessibility_audit", github: "thoughtbot\/capybara_accessibility_audit"/, file) assert_match "capybara_accessible_selectors", file end end