Created
April 3, 2025 22:17
-
-
Save Na0ki/37761ccfbf23cf41ac210804c93faedb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 3.2.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| # check behavior of issue below | |
| # https://github.com/travisjeffery/timecop/pull/389 | |
| require "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| gem "rails", "~> 7.0.8" | |
| gem 'holiday_jp' | |
| gem "minitest" | |
| gem "timecop", "0.9.5" # fails | |
| # gem "timecop", "0.9.6" # ok | |
| gem "timeout" | |
| gem 'concurrent-ruby', '1.3.4' | |
| end | |
| require 'rails/all' | |
| require "yaml" | |
| require "holiday_jp" | |
| require "minitest/autorun" | |
| require "logger" | |
| class MyApp < Rails::Application | |
| config.eager_load = false | |
| end | |
| Rails.application.initialize! | |
| class BugTest < Minitest::Test | |
| def test_holiday | |
| holidays = HolidayJp.between(Time.current.beginning_of_day, Time.current.end_of_day) | |
| holidays.each do |holiday| | |
| assert_instance_of Date, holiday.date | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment