b380da71b0
As a contributor, changing a single line to test the desired version does not warrant a separate file for each type of report. The only argument I can see for keeping the gem versions is that users are likely reporting a bug for a specific version of Rails, typically during an upgrade. As few people are probably testing their applications against Rails main branch. Additionally, having the gem version templates means that we are testing both main and a stable release of Rails in CI, which has some benefit. By removing the edge version templates, we also lose that coverage in CI, but I think it's something we can fix in buildkite-config to replace the line in those guides before running them later. IMO, the cost of separate files and the confusion it will create if we want to add more templates outweighs the benefits mentioned here. My motivation is that I want to add more report templates, like for additional adapters, and this list will grow to be unmanageable if we keep the gem versions.
31 lines
604 B
Ruby
31 lines
604 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "bundler/inline"
|
|
|
|
gemfile(true) do
|
|
source "https://rubygems.org"
|
|
|
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
|
|
gem "rails"
|
|
# If you want to test against edge Rails replace the previous line with this:
|
|
# gem "rails", github: "rails/rails", branch: "main"
|
|
end
|
|
|
|
require "active_job"
|
|
require "minitest/autorun"
|
|
|
|
class BuggyJob < ActiveJob::Base
|
|
def perform
|
|
puts "performed"
|
|
end
|
|
end
|
|
|
|
class BuggyJobTest < ActiveJob::TestCase
|
|
def test_stuff
|
|
assert_enqueued_with(job: BuggyJob) do
|
|
BuggyJob.perform_later
|
|
end
|
|
end
|
|
end
|