Browse files

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.
  • Loading branch information...
1 parent fa5726f commit dfcef831b5cc612495323114dd1bbb9366f05128 @pixeltrix pixeltrix committed Aug 4, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 activesupport/test/core_ext/time_with_zone_test.rb
View
1 activesupport/test/core_ext/time_with_zone_test.rb
@@ -1001,6 +1001,7 @@ def test_time_in_time_zone_doesnt_affect_receiver
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

0 comments on commit dfcef83

Please sign in to comment.