From 020a4113048be7166346cba6c59bbbca819de911 Mon Sep 17 00:00:00 2001 From: gbuesing Date: Thu, 13 Nov 2008 09:04:06 -0600 Subject: TimeZone: fix base offset for Sri Jayawardenepura. Anchor tests for zone offsets to more current date --- activesupport/test/time_zone_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/test') diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb index 515ffcf0bf..d999b9f2a8 100644 --- a/activesupport/test/time_zone_test.rb +++ b/activesupport/test/time_zone_test.rb @@ -51,7 +51,7 @@ class TimeZoneTest < Test::Unit::TestCase define_method("test_utc_offset_for_#{name}") do silence_warnings do # silence warnings raised by tzinfo gem - period = zone.tzinfo.period_for_utc(Time.utc(2006,1,1,0,0,0)) + period = zone.tzinfo.period_for_utc(Time.utc(2009,1,1,0,0,0)) assert_equal period.utc_offset, zone.utc_offset end end -- cgit v1.2.3 From 9eaa0a3449595d07fe2ada5c4c93ec226622147c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 15 Nov 2008 16:48:14 +0100 Subject: =?UTF-8?q?Added=20lambda=20merging=20to=20OptionMerger=20(especia?= =?UTF-8?q?lly=20useful=20with=20named=5Fscope=20and=20with=5Foptions)=20[?= =?UTF-8?q?#740=20state:committed]=20(Pawe=C5=82=20Kondzior)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- activesupport/test/option_merger_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/option_merger_test.rb b/activesupport/test/option_merger_test.rb index 0d72314880..f26d61617d 100644 --- a/activesupport/test/option_merger_test.rb +++ b/activesupport/test/option_merger_test.rb @@ -64,6 +64,14 @@ class OptionMergerTest < Test::Unit::TestCase end end end + + def test_nested_method_with_options_using_lamdba + local_lamdba = lambda { { :lambda => true } } + with_options(@options) do |o| + assert_equal @options.merge(local_lamdba.call), + o.method_with_options(local_lamdba).call + end + end # Needed when counting objects with the ObjectSpace def test_option_merger_class_method -- cgit v1.2.3