From 5719ad081f1b1b438cd8d79d9941e27a7e7c1631 Mon Sep 17 00:00:00 2001 From: Pedro Paiva Date: Sun, 25 Feb 2024 20:13:02 -0300 Subject: [PATCH] ci: fix undefined method run_n_unit_test_suite --- Appraisals | 4 ++-- Gemfile | 2 +- Gemfile.lock | 10 +++++++-- gemfiles/rails_6_0.gemfile | 4 ++-- gemfiles/rails_6_0.gemfile.lock | 22 +++++++++++-------- gemfiles/rails_6_1.gemfile | 34 +++++++++++++++--------------- gemfiles/rails_6_1.gemfile.lock | 22 +++++++++++-------- test/shoulda/rerun_snippet_test.rb | 4 ++-- 8 files changed, 58 insertions(+), 44 deletions(-) diff --git a/Appraisals b/Appraisals index d7d134ee..87de0c69 100644 --- a/Appraisals +++ b/Appraisals @@ -33,7 +33,7 @@ appraise "rails_6_0" do gem "jbuilder", "~> 2.7" gem "bcrypt", "~> 3.1.7" gem "bootsnap", ">= 1.4.2", require: false - gem "listen", ">= 3.0.5", "< 3.2" + gem 'listen', '~> 3.2' gem "spring-watcher-listen", "~> 2.0.0" gem "capybara", ">= 2.15" gem "selenium-webdriver" @@ -55,7 +55,7 @@ appraise "rails_6_1" do gem "jbuilder", "~> 2.7" gem "bcrypt", "~> 3.1.7" gem "bootsnap", ">= 1.4.2", require: false - gem "listen", ">= 3.0.5", "< 3.2" + gem 'listen', '~> 3.2' gem "spring-watcher-listen", "~> 2.0.0" gem "capybara", ">= 2.15" gem "selenium-webdriver" diff --git a/Gemfile b/Gemfile index 8a8e93c7..6e484f26 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,6 @@ gem "pry", "~> 0.12.0" gem "pry-byebug", "~> 3.6.0" gem "rake" gem "rubocop", "0.71.0" -gem "snowglobe", ">= 0.3.0" +gem 'snowglobe', git: 'https://github.com/mcmire/snowglobe.git', branch: 'master' gem "test-unit" gem "warnings_logger" diff --git a/Gemfile.lock b/Gemfile.lock index d2d8199e..67bf32a2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,10 @@ +GIT + remote: https://github.com/mcmire/snowglobe.git + revision: 812e1cdb07038c2327f15c76082cef9329f70430 + branch: master + specs: + snowglobe (0.3.0) + PATH remote: . specs: @@ -40,7 +47,6 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.1) - snowglobe (0.3.0) test-unit (3.3.5) power_assert thor (1.0.1) @@ -62,7 +68,7 @@ DEPENDENCIES rake rubocop (= 0.71.0) shoulda-context! - snowglobe (>= 0.3.0) + snowglobe! test-unit warnings_logger diff --git a/gemfiles/rails_6_0.gemfile b/gemfiles/rails_6_0.gemfile index f3d8391c..d998ae93 100644 --- a/gemfiles/rails_6_0.gemfile +++ b/gemfiles/rails_6_0.gemfile @@ -12,7 +12,7 @@ gem "pry", "~> 0.12.0" gem "pry-byebug", "~> 3.6.0" gem "rake" gem "rubocop", "0.71.0" -gem "snowglobe", ">= 0.3.0" +gem "snowglobe", git: "https://github.com/mcmire/snowglobe.git", branch: "master" gem "test-unit" gem "warnings_logger" gem "sqlite3", "~> 1.4.0" @@ -27,7 +27,7 @@ gem "turbolinks", "~> 5" gem "jbuilder", "~> 2.7" gem "bcrypt", "~> 3.1.7" gem "bootsnap", ">= 1.4.2", require: false -gem "listen", ">= 3.0.5", "< 3.2" +gem "listen", "~> 3.2" gem "spring-watcher-listen", "~> 2.0.0" gem "capybara", ">= 2.15" gem "selenium-webdriver" diff --git a/gemfiles/rails_6_0.gemfile.lock b/gemfiles/rails_6_0.gemfile.lock index fddfc415..f97f925e 100644 --- a/gemfiles/rails_6_0.gemfile.lock +++ b/gemfiles/rails_6_0.gemfile.lock @@ -1,3 +1,10 @@ +GIT + remote: https://github.com/mcmire/snowglobe.git + revision: e0b1c04da37bae7e820c6cf2b962bc0edfdddd7d + branch: master + specs: + snowglobe (0.3.0) + PATH remote: .. specs: @@ -88,7 +95,7 @@ GEM crass (1.0.6) digest (3.1.1) erubi (1.12.0) - ffi (1.15.5) + ffi (1.16.3) globalid (1.1.0) activesupport (>= 5.0) i18n (1.12.0) @@ -98,10 +105,9 @@ GEM jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -208,7 +214,6 @@ GEM unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.12.0) ruby2_keywords (0.0.5) - ruby_dep (1.5.0) rubyzip (2.3.2) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) @@ -223,7 +228,6 @@ GEM selenium-webdriver (3.142.7) childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) - snowglobe (0.3.0) spring (2.1.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) @@ -278,7 +282,7 @@ DEPENDENCIES byebug capybara (>= 2.15) jbuilder (~> 2.7) - listen (>= 3.0.5, < 3.2) + listen (~> 3.2) m minitest minitest-reporters @@ -294,7 +298,7 @@ DEPENDENCIES sass-rails (>= 6) selenium-webdriver shoulda-context! - snowglobe (>= 0.3.0) + snowglobe! spring spring-commands-rspec spring-watcher-listen (~> 2.0.0) diff --git a/gemfiles/rails_6_1.gemfile b/gemfiles/rails_6_1.gemfile index 59881a4b..9e6c4a12 100644 --- a/gemfiles/rails_6_1.gemfile +++ b/gemfiles/rails_6_1.gemfile @@ -3,35 +3,35 @@ source "https://rubygems.org" gem "appraisal" -gem "bcrypt", "~> 3.1.7" -gem "bootsnap", ">= 1.4.2", require: false gem "bundler", "~> 1.0" gem "byebug" -gem "capybara", ">= 2.15" -gem "jbuilder", "~> 2.7" -gem "listen", ">= 3.0.5", "< 3.2" gem "m" gem "minitest" -gem "minitest-reporters" gem "mocha" -gem "pg", ">= 0.18", "< 2.0" gem "pry", "~> 0.12.0" gem "pry-byebug", "~> 3.6.0" -gem "puma", "~> 5.0" -gem "rails", "~> 6.1.3.2" -gem "rails-controller-testing", ">= 1.0.4" gem "rake" gem "rubocop", "0.71.0" -gem "sass-rails", ">= 6" -gem "selenium-webdriver" -gem "snowglobe", ">= 0.3.0" +gem "snowglobe", git: "https://github.com/mcmire/snowglobe.git", branch: "master" +gem "test-unit" +gem "warnings_logger" +gem "sqlite3", "~> 1.4.0" gem "spring" gem "spring-commands-rspec" -gem "spring-watcher-listen", "~> 2.0.0" -gem "sqlite3", "~> 1.4.0" -gem "test-unit" +gem "minitest-reporters" +gem "rails", "~> 6.1.3.2" +gem "puma", "~> 5.0" +gem "sass-rails", ">= 6" gem "turbolinks", "~> 5" -gem "warnings_logger" +gem "jbuilder", "~> 2.7" +gem "bcrypt", "~> 3.1.7" +gem "bootsnap", ">= 1.4.2", require: false +gem "listen", "~> 3.2" +gem "spring-watcher-listen", "~> 2.0.0" +gem "capybara", ">= 2.15" +gem "selenium-webdriver" gem "webdrivers" +gem "rails-controller-testing", ">= 1.0.4" +gem "pg", ">= 0.18", "< 2.0" gemspec path: "../" diff --git a/gemfiles/rails_6_1.gemfile.lock b/gemfiles/rails_6_1.gemfile.lock index ddd1d741..7bdee42a 100644 --- a/gemfiles/rails_6_1.gemfile.lock +++ b/gemfiles/rails_6_1.gemfile.lock @@ -1,3 +1,10 @@ +GIT + remote: https://github.com/mcmire/snowglobe.git + revision: e0b1c04da37bae7e820c6cf2b962bc0edfdddd7d + branch: master + specs: + snowglobe (0.3.0) + PATH remote: .. specs: @@ -92,7 +99,7 @@ GEM crass (1.0.6) date (3.3.3) erubi (1.12.0) - ffi (1.15.5) + ffi (1.16.3) globalid (1.1.0) activesupport (>= 5.0) i18n (1.14.1) @@ -101,10 +108,9 @@ GEM jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) loofah (2.21.3) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -210,7 +216,6 @@ GEM unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - ruby_dep (1.5.0) rubyzip (2.3.2) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) @@ -226,7 +231,6 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - snowglobe (0.3.0) spring (2.1.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) @@ -276,7 +280,7 @@ DEPENDENCIES byebug capybara (>= 2.15) jbuilder (~> 2.7) - listen (>= 3.0.5, < 3.2) + listen (~> 3.2) m minitest minitest-reporters @@ -292,7 +296,7 @@ DEPENDENCIES sass-rails (>= 6) selenium-webdriver shoulda-context! - snowglobe (>= 0.3.0) + snowglobe! spring spring-commands-rspec spring-watcher-listen (~> 2.0.0) diff --git a/test/shoulda/rerun_snippet_test.rb b/test/shoulda/rerun_snippet_test.rb index 7a5baad9..8efccaa1 100644 --- a/test/shoulda/rerun_snippet_test.rb +++ b/test/shoulda/rerun_snippet_test.rb @@ -3,7 +3,7 @@ class RerunSnippetTest < PARENT_TEST_CASE context "A Rails application with shoulda-context added to it" do should "display the correct rerun snippet when a test fails" do - if app.rails_version >= 5 && TEST_FRAMEWORK == "minitest" + if TEST_FRAMEWORK == "minitest" app.create app.write_file("test/models/failing_test.rb", <<~RUBY) @@ -44,7 +44,7 @@ def failure_message_when_negated command_runner = app.run_n_unit_test_suite - expected_executable = rails_version >= 6 ? "rails test" : "bin/rails test" + expected_executable = "rails test" assert_includes(command_runner.output, "#{expected_executable} test/models/failing_test.rb:27") assert_includes(command_runner.output, "#{expected_executable} test/models/failing_test.rb:31")