Follow-up from "Use Ruby code to determine which migrations to run"
The following discussion from !1413 (merged) should be addressed:
-
@toon started a discussion: (+1 comment)
Thanks!
rubocop
isn't happy though:spec/lib/gdk/gitlab_rails/db_spec.rb:8:5: C: RSpec/EmptyLineAfterFinalLet: Add an empty line after the last let block. let(:shellout_mock) { double('Shellout', stream: nil, success?: true) } ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ spec/lib/gdk/postgresql_spec.rb:48:7: C: RSpec/PredicateMatcher: Prefer using be_db_exists matcher over db_exists?. expect(subject.db_exists?('blaat')).to be_truthy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ spec/lib/gdk/postgresql_spec.rb:71:7: C: RSpec/PredicateMatcher: Prefer using be_in_recovery matcher over in_recovery?. expect(subject.in_recovery?).to be_truthy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ spec/lib/gdk/postgresql_spec.rb:78:7: C: RSpec/PredicateMatcher: Prefer using be_in_recovery matcher over in_recovery?. expect(subject.in_recovery?).to be_falsy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ spec/lib/gdk/postgresql_spec.rb:85:7: C: RSpec/PredicateMatcher: Prefer using be_in_recovery matcher over in_recovery?. expect(subject.in_recovery?).to be_falsy ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I've fixed
spec/lib/gdk/gitlab_rails/db_spec.rb
but I'm not a fan ofRSpec/PredicateMatcher
as it makes tests harder to read so am going to disable in another MR🙂 @ashmckenzie I'm back, this time with some specs.