diff --git a/.github/REPRODUCTION_SCRIPT.rb b/.github/REPRODUCTION_SCRIPT.rb index 99b638a..39a3b57 100644 --- a/.github/REPRODUCTION_SCRIPT.rb +++ b/.github/REPRODUCTION_SCRIPT.rb @@ -4,13 +4,25 @@ gemfile(true) do source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem "factory_bot", "~> 5.0" + gem "activerecord" + gem "sqlite3" end +require "active_record" require "factory_bot" require "minitest/autorun" +require "logger" -class Post - attr_accessor :body +ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:") +ActiveRecord::Base.logger = Logger.new(STDOUT) + +ActiveRecord::Schema.define do + create_table :posts, force: true do |t| + t.string :body + end +end + +class Post < ActiveRecord::Base end FactoryBot.define do