You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Evaluate shared/deduplicated fixture models across the spec suite #184
Follow-up to #169's "Shared fixture models (optional)" proposal, which hasn't been acted on yet.
Problem
#169's original proposal suggested moving stable, repeated model definitions into spec/support/models/ "only where duplication exceeds benefit," keeping Book/Isbn in spec/non_rails_app/ruby_classes.rb as the canonical non-Rails example. #180 and #182 addressed the other three proposed items (anonymous-class helper, CSV expectation helper, and — for #182 specifically — pulling ActiveRecord/Mongoid/DataMapper models out of describe blocks for RuboCop reasons), but neither PR looked at whether any plain (non-ORM) model classes are duplicated across spec files in a way worth consolidating.
Proposed approach
Audit spec/comma/comma_spec.rb, spec/comma/data_extractor_spec.rb, and spec/comma/header_extractor_spec.rb (all now using define_comma_class) for near-identical anonymous class bodies used across multiple examples. Only extract a shared support model where duplication genuinely exceeds the benefit of an inline, self-documenting example — per #169, this is explicitly optional and not about replacing the intentional inline-DSL style wholesale.
Acceptance criteria
Either: at least one duplicated model consolidated into spec/support/models/ with the duplicated inline definitions removed, or an explicit note (in this issue or a PR comment) that no consolidation was found to be worth it
Activity