зеркало из https://github.com/github/ruby.git
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:
Родитель
7a666d95f7
Коммит
66d09c6d12
|
@ -35,7 +35,7 @@ class TestTimeTZ < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
module Util
|
||||
def have_tz_offset(tz)
|
||||
def have_tz_offset?(tz)
|
||||
with_tz(tz) {!Time.now.utc_offset.zero?}
|
||||
end
|
||||
|
||||
|
@ -81,8 +81,8 @@ class TestTimeTZ < Test::Unit::TestCase
|
|||
include Util
|
||||
extend Util
|
||||
|
||||
has_right_tz &&= have_tz_offset("right/America/Los_Angeles")
|
||||
has_lisbon_tz &&= have_tz_offset("Europe/Lisbon")
|
||||
has_right_tz &&= have_tz_offset?("right/America/Los_Angeles")
|
||||
has_lisbon_tz &&= have_tz_offset?("Europe/Lisbon")
|
||||
|
||||
def time_to_s(t)
|
||||
t.to_s
|
||||
|
|
Загрузка…
Ссылка в новой задаче