Skip to content

test: use constructor seeds in model specs - #22

Merged
kholdrex merged 1 commit into
mainfrom
test/constructor-seed-determinism
Jul 26, 2026
Merged

test: use constructor seeds in model specs#22
kholdrex merged 1 commit into
mainfrom
test/constructor-seed-determinism

Conversation

@kholdrex

@kholdrex kholdrex commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary

Model determinism specs now exercise the public constructor seed: option instead of resetting Ruby's global random number generator. The large generated datasets in the model specs also use local random generators so those smoke fixtures remain reproducible without polluting process-wide RNG state.

Changes

  • Updated Rasch, 2PL, and 3PL per-model deterministic examples to pass seed: directly to constructors.
  • Replaced global random fixture generation with local Random.new instances.
  • Seeded the corresponding model construction in large-dataset smoke tests for easier failure reproduction.

Test plan

  • Targeted model specs passed for Rasch, 2PL, and 3PL.
  • Full RSpec suite passed.
  • RuboCop passed with no offenses.
  • Gem package build completed successfully.

@kholdrex
kholdrex merged commit 46d29f4 into main Jul 26, 2026
5 checks passed
@kholdrex
kholdrex deleted the test/constructor-seed-determinism branch July 26, 2026 13:28
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