From be431a328d6838983fbbecd68689304966c90d06 Mon Sep 17 00:00:00 2001 From: Kevin McCormack Date: Sun, 12 Sep 2021 19:00:25 -0400 Subject: [PATCH] Update active record spec for Ruby 2.6.8 --- spec/ext/active_record_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/ext/active_record_spec.rb b/spec/ext/active_record_spec.rb index fcb81b4..68dc65c 100644 --- a/spec/ext/active_record_spec.rb +++ b/spec/ext/active_record_spec.rb @@ -297,7 +297,7 @@ class SubUser < User { ) elsif RUBY_VERSION >= '3.0.0' expect(out).to match(/\sprimary_key\(.*?\)\s+# \(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+# \(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/) @@ -318,7 +318,7 @@ class SubUser < User { expect(out).to match(/\svalidate\(\*arg.*?\)\s+# \(ActiveModel::Validations::ClassMethods\)/) elsif RUBY_VERSION >= '3.0.0' expect(out).to match(/\svalidate\(\*arg.*?\)\s+# \(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+# \(ActiveModel::Validations::ClassMethods\)/ )