Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- { ruby_version: '3.2', rails_gemfile: '7.2', postgres_version: '12' }
- { ruby_version: '3.2', rails_gemfile: '7.2', postgres_version: '13' }
- { ruby_version: '3.2', rails_gemfile: '7.2', postgres_version: '14' }
- { ruby_version: '3.3', rails_gemfile: '7.2', postgres_version: '14' }
- { ruby_version: '3.4', rails_gemfile: '7.2', postgres_version: '14' }
exclude: # Rails 7.2 is not compatible with Ruby < 3.1
- ruby_version: '2.7'
rails_gemfile: '7.2'
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ group :development, :test do
end

group :test do
gem 'minitest', '~> 5.10.1'
gem 'minitest', '~> 5.25.0'
gem 'minitest-profile', '0.0.2'
gem 'minitest-hooks', '1.4.0'
gem 'minitest-fail-fast', '0.1.0'
Expand Down
2 changes: 1 addition & 1 deletion spec/gemfiles/Gemfile-rails-6.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group :development, :test do
end

group :test do
gem 'minitest', '~> 5.10.1'
gem 'minitest', '~> 5.25.0'
gem 'minitest-profile', '0.0.2'
gem 'minitest-hooks', '1.4.0'
gem 'pry'
Expand Down
2 changes: 1 addition & 1 deletion spec/gemfiles/Gemfile-rails-6.1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group :development, :test do
end

group :test do
gem 'minitest', '~> 5.10.1'
gem 'minitest', '~> 5.25.0'
gem 'minitest-profile', '0.0.2'
gem 'minitest-hooks', '1.4.0'
gem 'pry'
Expand Down
2 changes: 1 addition & 1 deletion spec/gemfiles/Gemfile-rails-7.0
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group :development, :test do
end

group :test do
gem 'minitest', '~> 5.10.1'
gem 'minitest', '~> 5.25.0'
gem 'minitest-profile', '0.0.2'
gem 'minitest-hooks', '1.4.0'
gem 'pry'
Expand Down
2 changes: 1 addition & 1 deletion spec/gemfiles/Gemfile-rails-7.1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group :development, :test do
end

group :test do
gem 'minitest', '~> 5.10.1'
gem 'minitest', '~> 5.25.0'
gem 'minitest-profile', '0.0.2'
gem 'minitest-hooks', '1.4.0'
gem 'pry'
Expand Down
2 changes: 1 addition & 1 deletion spec/gemfiles/Gemfile-rails-7.2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ group :development, :test do
end

group :test do
gem 'minitest', '~> 5.10.1'
gem 'minitest', '~> 5.25.0'
gem 'minitest-profile', '0.0.2'
gem 'minitest-hooks', '1.4.0'
gem 'pry'
Expand Down
10 changes: 8 additions & 2 deletions spec/que/command_line_interface_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'spec_helper'

require 'digest/md5'
require 'securerandom'
require 'que/command_line_interface'

describe Que::CommandLineInterface do
Expand Down Expand Up @@ -93,7 +93,13 @@ def write_file
# same files will result in spec failures. So instead just generate a new
# file name for each spec to write/delete.

name = "spec/temp/file_#{Digest::MD5.hexdigest(rand.to_s)}"
# This can't use Kernel#rand, because minitest 5.16 and up call
# `srand Minitest.seed` before shuffling each suite's methods, so the
# global PRNG replays the same sequence once per describe block. Two specs
# in different blocks would then be given the same file name, and the
# second `require` of it does nothing - the path is already in
# $LOADED_FEATURES - leaving LOADED_FILES without an entry for it.
name = "spec/temp/file_#{SecureRandom.hex(16)}"
written_files << name
File.open("#{name}.rb", 'w') { |f| f.puts %(LOADED_FILES["#{name}"] = true) }
name
Expand Down
7 changes: 5 additions & 2 deletions spec/que/listener_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,13 @@ def assert_message_ignored

assert_instance_of Que::Error, error

# Inspected rather than written out, so that the expectation holds on
# Rubies that inspect hashes differently - 3.4 prints {priority: 90}
# where earlier versions print {:priority=>90}.
expected_message = [
"Message of type 'job_available' doesn't match format!",
"Message: {:priority=>90, :queue=>\"queue_name\", :run_at=>\"2017-06-30T18:33:35.425307Z\"}",
"Format: {:id=>Integer, :priority=>Integer, :queue=>String, :run_at=>/\\A\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{6}Z\\z/}",
"Message: #{{priority: 90, queue: "queue_name", run_at: "2017-06-30T18:33:35.425307Z"}.inspect}",
"Format: #{{id: Integer, priority: Integer, queue: String, run_at: /\A\d{4}\-\d{2}\-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}Z\z/}.inspect}",
].join("\n")

assert_equal expected_message, error.message
Expand Down
Loading