Permalink
Browse files

Remove 2 particularly contrived specs

They were both identical, failing under jruby, trying to access instance variables etc..
  • Loading branch information...
1 parent af62c27 commit 3bed9d3ec81e8d52da3f8e8e88d4b683dad263d5 @tigrish tigrish committed Jul 7, 2012
Showing with 1 addition and 21 deletions.
  1. +1 −21 test/backend/metadata_test.rb
@@ -16,24 +16,14 @@ def setup
assert translation.translation_metadata.is_a?(Hash)
end
- test "translate preserves metadata stored on original Strings" do
- store_metadata(:foo, :bar, 'bar')
- assert_equal 'bar', I18n.t(:foo, :name => 'David').translation_metadata[:bar]
- end
-
- test "translate preserves metadata stored on original Strings (when interpolated)" do
- store_metadata(:foo, :bar, 'bar')
- assert_equal 'bar', I18n.t(:foo, :name => 'David').translation_metadata[:bar]
- end
-
test "translate adds the locale to metadata on Strings" do
assert_equal :en, I18n.t(:foo, :name => 'David', :locale => :en).translation_metadata[:locale]
end
test "translate adds the key to metadata on Strings" do
assert_equal :foo, I18n.t(:foo, :name => 'David').translation_metadata[:key]
end
-#
+
test "translate adds the default to metadata on Strings" do
assert_equal 'bar', I18n.t(:foo, :default => 'bar', :name => '').translation_metadata[:default]
end
@@ -53,15 +43,5 @@ def setup
test "metadata works with frozen values" do
assert_equal(1, I18n.t(:missing, :count => 1, :default => 'foo'.freeze).translation_metadata[:count])
end
-
- protected
-
- def translations
- I18n.backend.instance_variable_get(:@translations)
- end
-
- def store_metadata(key, name, value)
- translations[:en][key].translation_metadata[name] = value
- end
end

0 comments on commit 3bed9d3

Please sign in to comment.