Skip to content

Commit

Permalink
Disable failing activerecord tests on ruby 2.5.0
Browse files Browse the repository at this point in the history
These tests are already fixed on 5-1-stable.
rails/rails@0806941
  • Loading branch information
gussan committed Jan 9, 2018
1 parent a07cca6 commit d4ac3e0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Rakefile
Expand Up @@ -104,6 +104,27 @@ namespace :turntable do
EOS
end
end

if ActiveRecord.gem_version.release <= Gem::Version.new("5.1.4")
ignores = [
["aggregations_test.rb", "AggregationsTest", "test_immutable_value_objects"],
["query_cache_test.rb", "QueryCacheTest", "test_query_cache_does_not_allow_sql_key_mutation"],
["transactions_test.rb", "TransactionTest", "test_rollback_when_saving_a_frozen_record"],
]

ignores.each do |file_name, class_name, method_name|
path = File.join("test/cases", file_name)
next unless File.exist?(path)

File.open(File.join("test/cases", file_name), "a") do |f|
f << <<-EOS.strip_heredoc
class #{class_name}
undef_method :#{method_name} if method_defined?(:#{method_name})
end
EOS
end
end
end
end

task :db => :rails do
Expand Down

0 comments on commit d4ac3e0

Please sign in to comment.