spec: fix acts_as_list for rails 6.1

Change-Id: I1a1e1c4830ca1aac71ae9eb683b28bb13c5bd6da
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254791
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
Cody Cutrer 2020-12-09 19:38:04 -07:00
parent 823abf4ac1
commit 0db307f008
2 changed files with 2 additions and 3 deletions

View File

@ -17,9 +17,8 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.add_dependency 'rails', ">= 3.2"
spec.add_dependency 'activerecord', '5.2.4.4'
spec.add_development_dependency "bundler", "~> 1.5"
spec.add_development_dependency "bundler", ">= 1.5", "< 3.0"
spec.add_development_dependency "sqlite3"
spec.add_development_dependency "rspec", "~> 3.5.0"
end

View File

@ -278,7 +278,7 @@ describe "ListTest" do
class Mixin < ActiveRecord::Base
def self.nulls(first_or_last, column, direction = nil)
"#{column} IS#{' NOT' unless first_or_last == :last} NULL, #{column} #{direction.to_s.upcase}".strip
Arel.sql("#{column} IS#{' NOT' unless first_or_last == :last} NULL, #{column} #{direction.to_s.upcase}".strip)
end
end