Skip to content

Test ImmutableString custom boolean options and serialize - #57509

Merged
byroot merged 1 commit into
rails:mainfrom
hammadxcm:test-immutable-string-booleans
Jun 1, 2026
Merged

byroot merged 1 commit into
rails:mainfrom
hammadxcm:test-immutable-string-booleans

Conversation

@hammadxcm

Copy link
Copy Markdown
Contributor

ActiveModel::Type::ImmutableString documents custom true:/false: constructor options and casts/serializes booleans, numerics, and symbols to strings, but the existing test only covered string frozenness.

This adds coverage for:

  • the documented true:/false: constructor options (both cast and serialize)
  • the default boolean string representations ("t"/"f")
  • the numeric and symbol serialize branches

No production code changes — test-only.

ActiveModel::Type::ImmutableString documents custom :true and :false
constructor options and casts/serializes booleans, numerics, and
symbols to strings, but the test only covered string frozenness.

Add coverage for the documented true:/false: options, the default
boolean string representations, and the numeric/symbol serialize
branches.
@byroot
byroot merged commit c3452b9 into rails:main Jun 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants