Skip to content

Commit

Permalink
Update active record spec for Ruby 2.6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
HarlemSquirrel committed Sep 12, 2021
1 parent e3c6238 commit be431a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/ext/active_record_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ class SubUser < User {
)
elsif RUBY_VERSION >= '3.0.0'
expect(out).to match(/\sprimary_key\(.*?\)\s+#<Class:User> \(ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods\)/)
elsif RUBY_VERSION == '2.6.7'
elsif RUBY_VERSION >= '2.6.7' && RUBY_VERSION < '2.7.0'
expect(out).to match(/\sprimary_key\(.*?\)\s+#<Class:ActiveRecord::Base> \(ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods\)/)
elsif RUBY_VERSION =~ /^2\.4\.([4-9]|[1-9][0-9])|^2\.[56]\./ || RUBY_VERSION >= '2.7.2'
expect(out).to match(/\sprimary_key\(.*?\)\s+User/)
Expand All @@ -318,7 +318,7 @@ class SubUser < User {
expect(out).to match(/\svalidate\(\*arg.*?\)\s+#<Class:\w+> \(ActiveModel::Validations::ClassMethods\)/)
elsif RUBY_VERSION >= '3.0.0'
expect(out).to match(/\svalidate\(\*arg.*?\)\s+#<Class:User> \(ActiveModel::Validations::ClassMethods\)/)
elsif RUBY_VERSION =~ /2\.7\.(0|1)/ || RUBY_VERSION == '2.6.7'
elsif RUBY_VERSION =~ /2\.7\.(0|1)/ || (RUBY_VERSION >= '2.6.7' && RUBY_VERSION < '2.7.0')
expect(out).to match(
/\svalidate\(\*args.*?\)\s+#<Class:ActiveRecord::Base> \(ActiveModel::Validations::ClassMethods\)/
)
Expand Down

0 comments on commit be431a3

Please sign in to comment.