test_time_tz.rb: have_tz_offset?
* test/ruby/test_time_tz.rb (TestTimeTZ::Util#have_tz_offset?): append ?-suffix as a predicate method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7a666d95f7
commit
66d09c6d12
@ -35,7 +35,7 @@ class TestTimeTZ < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
module Util
|
module Util
|
||||||
def have_tz_offset(tz)
|
def have_tz_offset?(tz)
|
||||||
with_tz(tz) {!Time.now.utc_offset.zero?}
|
with_tz(tz) {!Time.now.utc_offset.zero?}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -81,8 +81,8 @@ class TestTimeTZ < Test::Unit::TestCase
|
|||||||
include Util
|
include Util
|
||||||
extend Util
|
extend Util
|
||||||
|
|
||||||
has_right_tz &&= have_tz_offset("right/America/Los_Angeles")
|
has_right_tz &&= have_tz_offset?("right/America/Los_Angeles")
|
||||||
has_lisbon_tz &&= have_tz_offset("Europe/Lisbon")
|
has_lisbon_tz &&= have_tz_offset?("Europe/Lisbon")
|
||||||
|
|
||||||
def time_to_s(t)
|
def time_to_s(t)
|
||||||
t.to_s
|
t.to_s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user