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

25 lines
543 B
Ruby
Raw Normal View History

require "abstract_unit"
2012-01-05 20:12:46 -05:00
class MultibyteUnicodeDatabaseTest < ActiveSupport::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
2015-06-11 12:18:33 -04:00
assert_called(@ucd, :load) do
@ucd.send(attribute)
end
end
end
def test_load
@ucd.load
UnicodeDatabase::ATTRIBUTES.each do |attribute|
assert @ucd.send(attribute).length > 1
end
end
end