Fix initialization crash when no DB connection#177
Conversation
| before do | ||
| utils.define_migration_file("20241218064344_ts360.rb", <<~RUBY) | ||
| class Ts360 < ActiveRecord::Migration[6.0] | ||
| class TS360 < ActiveRecord::Migration[6.0] |
There was a problem hiding this comment.
@NeverovDS please see the reason this test has been added and what it tests - #108
lib/actual_db_schema/engine.rb
Outdated
| end | ||
| end | ||
|
|
||
| # rubocop:disable Metrics/BlockLength |
There was a problem hiding this comment.
Instead of disabling this cop, can we come up with some other solution? E.g. create an internal class that us called within this block?
test/rake_task_test.rb
Outdated
| end | ||
|
|
||
| after do | ||
| utils.reset_acronyms |
There was a problem hiding this comment.
@NeverovDS if we do that within the utils.cleanup method, would it work?
There was a problem hiding this comment.
Or maybe remove this after block? Is it needed?
There was a problem hiding this comment.
As I know, cleanup does a lot of unnecessary things: removes migrations, cleans the schema, reloads rake-tasks, deletes tmp/migrated
There was a problem hiding this comment.
@NeverovDS as I see the point of cleanup is to prepare a clean env for tests. It's currently executed everywhere in before block. Sounds like a good place for cleaning acronyms too. Why not? Otherwise, please elaborate on why all these things in cleanup are unnecessary.
There was a problem hiding this comment.
@ka8725 Sorry, I misunderstood you a little, you're right
Closes #176