aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-01-20 21:58:22 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2010-01-20 21:58:22 +1100
commit8b37fee201bb3f41d3bc4557422c5f8b344f456c (patch)
tree5c24f3f85f10976b3407f557517dcccf0343cd72 /activesupport/test
parentc04baed627c85e586e337896d64f61f397554a46 (diff)
parent8a1be228491f433fa8d20be4f485e2159f5ebe59 (diff)
downloadrails-8b37fee201bb3f41d3bc4557422c5f8b344f456c.tar.gz
rails-8b37fee201bb3f41d3bc4557422c5f8b344f456c.tar.bz2
rails-8b37fee201bb3f41d3bc4557422c5f8b344f456c.zip
Merge branch 'master' of git://github.com/rails/rails
Conflicts: actionmailer/lib/action_mailer/base.rb
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/load_error_test.rb15
-rw-r--r--activesupport/test/time_zone_test.rb6
2 files changed, 21 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/load_error_test.rb b/activesupport/test/core_ext/load_error_test.rb
index b775b65f9f..d7b8f602ca 100644
--- a/activesupport/test/core_ext/load_error_test.rb
+++ b/activesupport/test/core_ext/load_error_test.rb
@@ -15,3 +15,18 @@ class TestMissingSourceFile < Test::Unit::TestCase
end
end
end
+
+class TestLoadError < Test::Unit::TestCase
+ def test_with_require
+ assert_raise(LoadError) { require 'no_this_file_don\'t_exist' }
+ end
+ def test_with_load
+ assert_raise(LoadError) { load 'nor_does_this_one' }
+ end
+ def test_path
+ begin load 'nor/this/one.rb'
+ rescue LoadError => e
+ assert_equal 'nor/this/one.rb', e.path
+ end
+ end
+end \ No newline at end of file
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index 99c4310854..ce43c6507d 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -208,6 +208,12 @@ class TimeZoneTest < Test::Unit::TestCase
assert_equal "+0000", ActiveSupport::TimeZone.seconds_to_utc_offset(0, false)
assert_equal "+0500", ActiveSupport::TimeZone.seconds_to_utc_offset(18_000, false)
end
+
+ def test_seconds_to_utc_offset_with_negative_offset
+ assert_equal "-01:00", ActiveSupport::TimeZone.seconds_to_utc_offset(-3_600)
+ assert_equal "-00:59", ActiveSupport::TimeZone.seconds_to_utc_offset(-3_599)
+ assert_equal "-05:30", ActiveSupport::TimeZone.seconds_to_utc_offset(-19_800)
+ end
def test_formatted_offset_positive
zone = ActiveSupport::TimeZone['Moscow']