1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/test/multibyte_unicode_database_test.rb
Manfred Stienstra 22f75d539d Simplify ActiveSupport::Multibyte and make it run on Ruby 1.9.
* Unicode methods are now defined directly on Chars instead of a handler
* Updated Unicode database to Unicode 5.1.0
* Improved documentation
2008-09-21 17:21:30 +02:00

28 lines
No EOL
623 B
Ruby

# encoding: utf-8
require 'abstract_unit'
uses_mocha "MultibyteUnicodeDatabaseTest" do
class MultibyteUnicodeDatabaseTest < Test::Unit::TestCase
def setup
@ucd = ActiveSupport::Multibyte::UnicodeDatabase.new
end
ActiveSupport::Multibyte::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
ActiveSupport::Multibyte::UnicodeDatabase::ATTRIBUTES.each do |attribute|
assert @ucd.send(attribute).length > 1
end
end
end
end