aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/time_with_zone_test.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2013-08-04 07:09:30 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2013-08-04 07:09:30 +0100
commitdfcef831b5cc612495323114dd1bbb9366f05128 (patch)
tree2e3b8416abb1d7eea13c3cecb2a142a17a7935e3 /activesupport/test/core_ext/time_with_zone_test.rb
parentfa5726fba88ef6918d3652f9ad42f41cb5f5a575 (diff)
downloadrails-dfcef831b5cc612495323114dd1bbb9366f05128.tar.gz
rails-dfcef831b5cc612495323114dd1bbb9366f05128.tar.bz2
rails-dfcef831b5cc612495323114dd1bbb9366f05128.zip
Fix unused variable warning
We need to call `in_time_zone` to test that it isn't modifying the receiver but since the variable isn't used it raises a warning so add an assertion to make Ruby think it's being used.
Diffstat (limited to 'activesupport/test/core_ext/time_with_zone_test.rb')
-rw-r--r--activesupport/test/core_ext/time_with_zone_test.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb
index baac9e07ce..5494824a40 100644
--- a/activesupport/test/core_ext/time_with_zone_test.rb
+++ b/activesupport/test/core_ext/time_with_zone_test.rb
@@ -1001,6 +1001,7 @@ class TimeWithZoneMethodsForTimeAndDateTimeTest < ActiveSupport::TestCase
with_env_tz 'Europe/London' do
time = Time.local(2000, 7, 1)
time_with_zone = time.in_time_zone('Eastern Time (US & Canada)')
+ assert_equal Time.utc(2000, 6, 30, 23, 0, 0), time_with_zone
assert_not time.utc?, 'time expected to be local, but is UTC'
end
end