Skip to content

Commit

Permalink
This should pass all existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
noelrappin committed Aug 21, 2023
1 parent cf542c5 commit 560a582
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ appraise "rails-6.1" do
gem "rails", "~> 6.1.0"
end

appraise "rails-7.0" do
gem "rails", "~> 7.0"
end
# appraise "rails-7.0" do
# gem "rails", "~> 7.0"
# end
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7
FROM ruby:3.0

WORKDIR /usr/src/app

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module ConnectionAdapters
module MySQL
module ColumnMethods
def enum(*args, **options)
args.each { |name| column(name, :enum, options) }
args.each { |name| column(name, :enum, **options) }
end
end
end
Expand Down
23 changes: 23 additions & 0 deletions spec/active_record/column_methods_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require 'spec_helper'

class FakeAdapter
def self.define_column_methods(*args)
# no-op
end

include ActiveRecord::ConnectionAdapters::MySQL::ColumnMethods
end

module ActiveRecord
module ConnectionAdapters
module MySQL
RSpec.describe ColumnMethods do
it "correctly calls based on enum" do
instance = FakeAdapter.new
expect(instance).to receive(:column).with(:status, :enum, limit: [:active, :archived])
instance.enum(:status, limit: [:active, :archived])
end
end
end
end
end

0 comments on commit 560a582

Please sign in to comment.