Skip to content

Commit 82b2aed

Browse files
committed
Handle missing timezone data in test
Fixes: #351
1 parent adb2ccc commit 82b2aed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/mini_racer_test.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,9 +1106,13 @@ def test_function_property
11061106
def test_dates_from_active_support
11071107
require "active_support"
11081108
require "active_support/time"
1109-
context = MiniRacer::Context.new
1110-
Time.zone = "UTC"
1109+
begin
1110+
Time.zone = "UTC"
1111+
rescue TZInfo::DataSourceNotFound
1112+
skip "no timezone data" # happens on the musl buildbots
1113+
end
11111114
time = Time.current
1115+
context = MiniRacer::Context.new
11121116
context.attach("f", proc { time })
11131117
assert_in_delta time.to_f, context.call("f").to_f, 0.001
11141118
end

0 commit comments

Comments
 (0)