Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Rspec TimeScheduleConverter Failure #456

Closed
2 tasks
kyleecodes opened this issue Aug 5, 2024 · 2 comments
Closed
2 tasks

Fix Rspec TimeScheduleConverter Failure #456

kyleecodes opened this issue Aug 5, 2024 · 2 comments
Assignees
Labels
bug fix complexity: moderate Time and commitment needed to do this will be moderate (1-2 days) help wanted Extra attention is needed ruby Pull requests that update Ruby code tests Software testing

Comments

@kyleecodes
Copy link
Member

kyleecodes commented Aug 5, 2024

Overview

Currently, one of our TimeZoneScheduleConverter tests is failing:

Failures:

  1) TimeZoneScheduleConverter.convert when some days are provided when the adjusted hour moves behind into previous day(s) returns the adjusted hour and previous day(s)
     Failure/Error:
       expect(subject).to eq(
         days: %w[Sat Tue Fri],
         hour: adjusted_hour
       )

       expected: {:days=>["Sat", "Tue", "Fri"], :hour=>24}
            got: {:days=>["Sun", "Wed", "Sat"], :hour=>0}
            
                   (compared using ==)

       Diff:
       @@ -1,3 +1,3 @@
       -:days => ["Sat", "Tue", "Fri"],
       -:hour => 24,
       +:days => ["Sun", "Wed", "Sat"],
       +:hour => 0,
     # ./spec/lib/time_zone_schedule_converter_spec.rb:84:in `block (5 levels) in <top (required)>'
     
Failed examples:

rspec ./spec/lib/time_zone_schedule_converter_spec.rb:83 # TimeZoneScheduleConverter.convert when some days are provided when the adjusted hour moves behind into previous day(s) returns the adjusted hour and previous day(s).

This test is thrown by lines 77-89 in the spec/lib/time_zone_schedule_converter_spec.rb file. Possible solutions: change the expected values, modify the time and date calculations, consider daylight savings time in the region, etc.

Action Items

  • Read the error message and check the file where it originates.
  • Design a solution and verify with tests.

Resources

@kyleecodes kyleecodes added help wanted Extra attention is needed ruby Pull requests that update Ruby code tests Software testing complexity: beginner Time and commitment is less than 1 day. bug fix labels Aug 5, 2024
@kyleecodes kyleecodes added this to the 04. Maintenance and Testing milestone Aug 5, 2024
@martagrrez
Copy link
Collaborator

@kyleecodes Please could you assign me this issue?

Copy link

github-actions bot commented Aug 9, 2024

Thank you @martagrrez you have been assigned this issue!
Please follow the directions in our Contributing Guide. We look forward to reviewing your pull request shortly ✨


Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you!
Learn more about Chayn here and explore our projects. 🌸

@kyleecodes kyleecodes added complexity: moderate Time and commitment needed to do this will be moderate (1-2 days) and removed complexity: beginner Time and commitment is less than 1 day. labels Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix complexity: moderate Time and commitment needed to do this will be moderate (1-2 days) help wanted Extra attention is needed ruby Pull requests that update Ruby code tests Software testing
Development

No branches or pull requests

2 participants