summaryrefslogtreecommitdiff
path: root/vendor/plugins/globalize2/test/translation_test.rb
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2010-01-14 22:21:43 +0100
committerhukl <contact@smyck.org>2010-01-14 22:21:43 +0100
commit57d1382013c85a7b11ac8ce5e683f6006b12b328 (patch)
tree19646c4fa5952fa1cf0a2c874952affa346373f1 /vendor/plugins/globalize2/test/translation_test.rb
parent1b86bf5f2e35d1820bfa32d979bcc2d9ff9a9a8e (diff)
Updated globalize2 to latest version. Modified existing code accoringly
Diffstat (limited to 'vendor/plugins/globalize2/test/translation_test.rb')
-rw-r--r--vendor/plugins/globalize2/test/translation_test.rb54
1 files changed, 0 insertions, 54 deletions
diff --git a/vendor/plugins/globalize2/test/translation_test.rb b/vendor/plugins/globalize2/test/translation_test.rb
deleted file mode 100644
index 4b52bb10..00000000
--- a/vendor/plugins/globalize2/test/translation_test.rb
+++ /dev/null
@@ -1,54 +0,0 @@
1require File.join( File.dirname(__FILE__), 'test_helper' )
2require 'globalize/translation'
3
4class TranslationTest < ActiveSupport::TestCase
5 include Globalize
6
7 def setup
8 @translation = Translation::Static.new 'foo', :locale => :'en-US'
9 end
10
11 test "responds to fallback?" do
12 assert @translation.respond_to?( :fallback? )
13 end
14
15 test "returns true when :locale and :requested_locale are not equal" do
16 @translation.requested_locale = :'de-DE'
17 assert @translation.fallback?
18 end
19
20 test "returns false when :locale and :requested_locale are equal" do
21 @translation.requested_locale = :'en-US'
22 assert !@translation.fallback?
23 end
24
25 test "has the attribute :locale" do
26 assert @translation.respond_to?( :locale )
27 end
28
29 test "has the attribute :requested_locale" do
30 assert @translation.respond_to?( :requested_locale )
31 end
32
33 test "has the attribute :options" do
34 assert @translation.respond_to?( :options )
35 end
36
37 test "has the attribute :plural_key" do
38 assert @translation.respond_to?( :plural_key )
39 end
40
41 test "has the attribute :original" do
42 assert @translation.respond_to?( :original )
43 end
44
45 test "Translation::Attribute has the attribute :locale" do
46 translation = Translation::Attribute.new 'foo'
47 assert translation.respond_to?( :locale )
48 end
49
50 test "Translation::Attribute has the attribute :requested_locale" do
51 translation = Translation::Attribute.new 'foo'
52 assert translation.respond_to?( :requested_locale )
53 end
54end