Skip to content

Commit

Permalink
Fix spec setup for older activerecord
Browse files Browse the repository at this point in the history
  • Loading branch information
albus522 committed Nov 8, 2019
1 parent 0d1ed9a commit d602a5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ def migration_version
eval(migration_ruby) # rubocop:disable Security/Eval

ActiveRecord::Schema.define do
drop_table :delayed_jobs, if_exists: true
if table_exists?(:delayed_jobs)
# `if_exists: true` was only added in Rails 5
drop_table :delayed_jobs
end

CreateDelayedJobs.up

Expand Down

0 comments on commit d602a5d

Please sign in to comment.