diff options
author | Hans de Graaff <graaff@gentoo.org> | 2011-02-20 15:55:24 +0000 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2011-02-20 15:55:24 +0000 |
commit | e4164fce16e3a5698820ccf04f33c4308994aa39 (patch) | |
tree | f5ff9234727ea49bef3d48deb0e24ebbcec7b017 /dev-ruby/actionpack/files | |
parent | Marked ~ppc/~ppc64 wrt #352300, #355353 (diff) | |
download | gentoo-2-e4164fce16e3a5698820ccf04f33c4308994aa39.tar.gz gentoo-2-e4164fce16e3a5698820ccf04f33c4308994aa39.tar.bz2 gentoo-2-e4164fce16e3a5698820ccf04f33c4308994aa39.zip |
Fix tests with i18n-0.4.2.
(Portage version: 2.1.9.25/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/actionpack/files')
-rw-r--r-- | dev-ruby/actionpack/files/actionpack-2.3.10-i18n-0.4.2.patch | 45 | ||||
-rw-r--r-- | dev-ruby/actionpack/files/actionpack-2.3.11-rails3.patch | 13 |
2 files changed, 58 insertions, 0 deletions
diff --git a/dev-ruby/actionpack/files/actionpack-2.3.10-i18n-0.4.2.patch b/dev-ruby/actionpack/files/actionpack-2.3.10-i18n-0.4.2.patch new file mode 100644 index 000000000000..95efd54f5f42 --- /dev/null +++ b/dev-ruby/actionpack/files/actionpack-2.3.10-i18n-0.4.2.patch @@ -0,0 +1,45 @@ +Add additional shoulda expectations to cover apparently changed +semantics from i18n 0.4.1 > 0.4.2. It's not clear what changed +exactly, and it could well be a bug in actionpack which doesn't seem +to pass the locale along to all calls in some of these methods. Not +investigated further yet since all Rails development is aimed at Rails +3. + + +--- test/template/number_helper_i18n_test.rb.~1~ 2011-02-20 15:51:40.792064192 +0100 ++++ test/template/number_helper_i18n_test.rb 2011-02-20 16:42:56.067596179 +0100 +@@ -20,6 +20,8 @@ + end + + def test_number_to_currency_translates_currency_formats ++ I18n.expects(:translate).twice.with(:'number.format', {:locale => nil, :raise => true}).returns({}) ++ I18n.expects(:translate).with(:'number.precision.format', {:locale => nil, :raise => true}).returns({}) + I18n.expects(:translate).with(:'number.format', :locale => 'en', :raise => true).returns(@number_defaults) + I18n.expects(:translate).with(:'number.currency.format', :locale => 'en', + :raise => true).returns(@currency_defaults) +@@ -27,6 +29,7 @@ + end + + def test_number_with_precision_translates_number_formats ++ I18n.expects(:translate).with(:'number.format', {:locale => nil, :raise => true}).returns({}) + I18n.expects(:translate).with(:'number.format', :locale => 'en', :raise => true).returns(@number_defaults) + I18n.expects(:translate).with(:'number.precision.format', :locale => 'en', + :raise => true).returns(@precision_defaults) +@@ -39,6 +42,8 @@ + end + + def test_number_to_percentage_translates_number_formats ++ I18n.expects(:translate).twice.with(:'number.format', {:locale => nil, :raise => true}).returns({}) ++ I18n.expects(:translate).with(:'number.precision.format', {:locale => nil, :raise => true}).returns({}) + I18n.expects(:translate).with(:'number.format', :locale => 'en', :raise => true).returns(@number_defaults) + I18n.expects(:translate).with(:'number.percentage.format', :locale => 'en', + :raise => true).returns(@percentage_defaults) +@@ -46,6 +51,8 @@ + end + + def test_number_to_human_size_translates_human_formats ++ I18n.expects(:translate).twice.with(:'number.format', {:locale => nil, :raise => true}).returns({}) ++ I18n.expects(:translate).with(:'number.precision.format', {:locale => nil, :raise => true}).returns({}) + I18n.expects(:translate).with(:'number.format', :locale => 'en', :raise => true).returns(@number_defaults) + I18n.expects(:translate).with(:'number.human.format', :locale => 'en', + :raise => true).returns(@human_defaults) diff --git a/dev-ruby/actionpack/files/actionpack-2.3.11-rails3.patch b/dev-ruby/actionpack/files/actionpack-2.3.11-rails3.patch new file mode 100644 index 000000000000..b958d463fc4c --- /dev/null +++ b/dev-ruby/actionpack/files/actionpack-2.3.11-rails3.patch @@ -0,0 +1,13 @@ +--- test/abstract_unit.rb.~1~ 2011-02-10 08:12:37.551582393 +0100 ++++ test/abstract_unit.rb 2011-02-10 08:13:37.845418027 +0100 +@@ -19,6 +19,10 @@ + # Debugging disabled. `gem install ruby-debug` to enable. + end + ++gem 'activesupport', '~> 2.3' ++gem 'actionmailer', '~> 2.3' ++gem 'activerecord', '~> 2.3' ++ + require 'action_controller' + require 'action_controller/cgi_ext' + require 'action_controller/test_process' |