/test/test_helper.rb
Ruby | 27 lines | 23 code | 4 blank | 0 comment | 0 complexity | b22b9b41e723fd542dc5a518e2df5687 MD5 | raw file
- Test::Unit::TestCase.fixture_path = File.expand_path(File.dirname(__FILE__)) + "/fixtures/"
- $LOAD_PATH.unshift(Test::Unit::TestCase.fixture_path)
- Fixtures.create_fixtures(Test::Unit::TestCase.fixture_path, %w(countries languages translations).collect{|table_name| "globalize_#{table_name}"})
- class Test::Unit::TestCase
- def uses_config_file(config_file, &block)
- old_config_file = Locale.config_file
- Locale.config_file = old_config_file.gsub(/\w+\.\w+$/, config_file)
- Locale.configuration = false
- yield
- Locale.configuration = false
- Locale.config_file = old_config_file
- end
- end
- module Globalize #:nodoc:
- class Locale #:nodoc:
- cattr_writer :formatting, :configuration
- end
-
- module Helpers #:nodoc:
- def self.click_partial #:nodoc:
- @@click_partial
- end
- end
- end