2 | 2 |
Last-Update: 2015-09-06
|
3 | 3 |
---
|
4 | 4 |
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
5 | |
--- a/test/test_helper.rb
|
6 | |
+++ b/test/test_helper.rb
|
7 | |
@@ -9,4 +9,6 @@
|
|
5 |
Index: ruby-faker/test/test_helper.rb
|
|
6 |
===================================================================
|
|
7 |
--- ruby-faker.orig/test/test_helper.rb
|
|
8 |
+++ ruby-faker/test/test_helper.rb
|
|
9 |
@@ -2,12 +2,22 @@ require 'test/unit'
|
|
10 |
require 'rubygems'
|
|
11 |
require 'timecop'
|
|
12 |
require 'yaml'
|
|
13 |
+require 'pathname'
|
|
14 |
+
|
|
15 |
YAML::ENGINE.yamler = 'syck' if defined? YAML::ENGINE
|
|
16 |
require File.expand_path(File.dirname(__FILE__) + '/../lib/faker')
|
|
17 |
|
|
18 |
# configure I18n
|
|
19 |
-locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales')
|
|
20 |
+relative_locales_path = File.expand_path(File.dirname(__FILE__) + '../lib/locales')
|
|
21 |
+system_locales_path = File.expand_path(File.join(File.dirname(`gem which ruby-saml`),'locales'))
|
|
22 |
+locales_path = Pathname.new(relative_locales_path).directory? ? relative_locales_path : system_locales_path
|
8 | 23 |
I18n.available_locales = Dir[locales_path + '/*'].map do |file|
|
9 | 24 |
file.split('.').first
|
10 | 25 |
end
|
11 | 26 |
+
|
12 | |
+I18n.config.available_locales = :en, :xy, "en-US", "en-CA", "en-UG", "en-au-ocker", "es", :xx, :shire, :home, :work, :kindergarden, "en-BORK", :pl, "uk", "en-GB", :de
|
|
27 |
+I18n.config.available_locales = [:"ca-CAT", :ca, :"da-DK", :"de-AT", :"de-CH",
|
|
28 |
+:de, :"en-AU", "en-BORK", "en-CA", :"en-GB", :"en-IND", :"en-NEP", :"en-NZ",
|
|
29 |
+:"en-PAK", "en-US", "en-UG", :en, "en-au-ocker", "es", :"es-MX", :fa, :fi,
|
|
30 |
+:"fi-FI", :fr, :he, :it, :nep, :pl, :pt, :sv, :uk, :shire, :home, :work,
|
|
31 |
+:kindergarden, :xx, :xy]
|
13 | 32 |
I18n.enforce_available_locales = true
|