1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
# frozen_string_literal: true
# Iconv will not be defined, unless it is found -> normalize test results for users that have Iconv/those who do not have it
begin; require 'iconv'; rescue StandardError; LoadError; end
initial = methods.count + Module.constants.count
# FastGettext
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
require 'fast_gettext'
FastGettext.locale = 'de'
FastGettext.add_text_domain 'test', path: 'spec/locale'
FastGettext.text_domain = 'test'
include FastGettext::Translation # rubocop:disable Style/MixinUsage
raise unless _('car') == 'Auto'
puts "FastGettext"
puts methods.count + Module.constants.count - initial
|