Sha256: 29637955f1521238f7cf459badd571c85fb88f470323ceca7dc4c5c3eee8f24b
Contents?: true
Size: 679 Bytes
Versions: 1
Compression:
Stored size: 679 Bytes
Contents
# -*- coding: utf-8 -*- require 'test/unit' require 'net/http' require 'yaml' class TestHolidayJpYaml < Test::Unit::TestCase def test_yaml yaml = YAML.load_file(File.expand_path('../../holidays.yml', __FILE__)) uri = URI.parse('https://raw.githubusercontent.com/holiday-jp/holiday_jp/v0.x/holidays.yml') http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true holiday_jp_yaml = YAML.load(http.get(uri.request_uri).body) yaml.map do |date, name| assert_equal holiday_jp_yaml[date], name end holiday_jp_yaml.map do |date, name| assert_equal yaml[date], name end assert_equal yaml.length, holiday_jp_yaml.length end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
holiday_jp-0.8.0 | test/test_holiday_jp_yaml.rb |