Skip to content

test: fill coverage gaps (female encode, individual fields, round-trips, year/gender boundaries)#74

Open
matteoredz wants to merge 2 commits into
mainfrom
test/coverage-gaps
Open

test: fill coverage gaps (female encode, individual fields, round-trips, year/gender boundaries)#74
matteoredz wants to merge 2 commits into
mainfrom
test/coverage-gaps

Conversation

@matteoredz

Copy link
Copy Markdown
Owner

Summary

  • T1 — Female encoder test: gender: "F" applies day + 40 offset.
  • T2 — Individual MissingDataError tests per required field (surname, name, gender, birthdate, birthplace each set to nil individually with all others valid).
  • T3 — Encode→decode round-trip tests for male, female (day-offset), and foreign birthplace.
  • T4in_dates? false-path coverage: stubs cities via Mocha to expose an F205 entry whose validity window excludes the decoded birthdate → InvalidTaxCodeError raised (depends on fix/birthplace-nil-return being merged first).
  • T5 — Year century-rollback boundary: frozen at 2026-06-01, year code "26" → 2026 (≤ current year, else branch); year code "27" → 1927 (> current year, subtract 100).
  • T6 — Gender/day boundary: day 31 decodes as male; day 41 decodes as female with day 1.

Test plan

🤖 Generated with Claude Code

matteoredz and others added 2 commits May 29, 2026 22:50
…ities or countries

Previously the birthplace method returned nil implicitly when the stop:
true recursive call found nothing, masking invalid tax codes silently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…round-trips, year/gender boundaries

Adds T1 (female +40 day offset encoding), T2 (individual nil-field
MissingDataError tests), T3 (encode→decode round-trips for male, female,
and foreign), T4 (in_dates? false-branch via Mocha stub), T5 (year
century-rollback boundary with Timecop), and T6 (day 31 male / day 41
female gender boundary).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@matteoredz, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 36 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5d2969d8-bcfc-4f6d-a3a1-4b1da5f71d36

📥 Commits

Reviewing files that changed from the base of the PR and between b5aceb7 and eb5faad.

📒 Files selected for processing (5)
  • AGENTS.md
  • lib/itax_code/parser.rb
  • test/itax_code/encoder_test.rb
  • test/itax_code/parser_test.rb
  • test/itax_code_test.rb
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/coverage-gaps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant