Skip to content

Commit

Permalink
Fix conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-sharp committed Aug 7, 2024
1 parent 4e97eab commit 10ad19f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions spec/migration_lock_timeout/migration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

def expect_create_table
if ActiveRecord.gem_version >= '7.1'
expect(ActiveRecord::Base.connection).to receive(:execute).
with('BEGIN').
and_call_original
expect(ActiveRecord::Base.connection).to receive(:execute).
with(/CREATE TABLE/).
and_call_original
Expand All @@ -26,7 +23,7 @@ def expect_create_table
end

RSpec.describe ActiveRecord::Migration do
before { ActiveRecord::Base.logger = Logger.new(STDOUT) }

describe '#migrate' do

before(:each) do
Expand Down
2 changes: 2 additions & 0 deletions spec/migration_lock_timeout/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require 'database_cleaner'

RSpec.configure do |config|

ActiveRecord::Base.logger = Logger.new(STDOUT)
config.before(:suite) do
ActiveRecord::Base.establish_connection(
adapter: "postgresql",
Expand Down

0 comments on commit 10ad19f

Please sign in to comment.