<commit_before># encoding: utf-8
require File.expand_path('../../test_helper', __FILE__)

class TranslatedAttributesQueryTest
  class WhereValuesHashTest < Test::Unit::TestCase
    test 'includes translated attributes' do
      where_values = User.with_translations(:en).where(:email => '<EMAIL>', :user_translations => {:name => 'test_name'}).where_values_hash

      assert_equal '<EMAIL>', where_values[:email]
      assert_equal 'test_name', where_values[:name]
    end
  end
end<commit_msg>only run where_values_hash test in Rails >= 3.2.1.<commit_after># encoding: utf-8
require File.expand_path('../../test_helper', __FILE__)

class TranslatedAttributesQueryTest
  class WhereValuesHashTest < Test::Unit::TestCase
    if ::ActiveRecord::VERSION::STRING >= "3.2.1"
      test 'includes translated attributes' do
        where_values = User.with_translations(:en).where(:email => '<EMAIL>', :user_translations => {:name => 'test_name'}).where_values_hash

        assert_equal '<EMAIL>', where_values[:email]
        assert_equal 'test_name', where_values[:name]
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.13607305936073058, 'fraction_numerical': 0.0073059360730593605, 'mean_word_length': 4.708333333333333, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2645892', 'n_tokens_mistral': 329, 'n_tokens_neox': 324, 'n_words': 71}