Skip to content

test: use constructor seeds in model specs#22

Open
kholdrex wants to merge 1 commit into
mainfrom
test/constructor-seed-determinism
Open

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

Conversation

@kholdrex
Copy link
Copy Markdown
Member

@kholdrex kholdrex commented Jun 6, 2026

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.

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