aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/test/multibyte_unicode_database_test.rb
blob: 26a41579c2c1ea5d1099898ec09c0c7a06410bbb (plain) (tree)
1
2
3
4
5
6
7
8
9
                 

                       
 
                                                         


                                           
           
                              

     
                                                 




                                                                            
 

               
                                                   



                                            
# encoding: utf-8
require 'abstract_unit'


class MultibyteUnicodeDatabaseTest < Test::Unit::TestCase

  include ActiveSupport::Multibyte::Unicode

  def setup
    @ucd = UnicodeDatabase.new
  end

  UnicodeDatabase::ATTRIBUTES.each do |attribute|
    define_method "test_lazy_loading_on_attribute_access_of_#{attribute}" do
      @ucd.expects(:load)
      @ucd.send(attribute)
    end
  end

  def test_load
    @ucd.load
    UnicodeDatabase::ATTRIBUTES.each do |attribute|
      assert @ucd.send(attribute).length > 1
    end
  end
end