Skip to content

Refactor: Split monetizable_spec.rb into smaller files - #784

Open
RubenIgnacio wants to merge 6 commits into
RubyMoney:mainfrom
RubenIgnacio:improve_specs_orgnization
Open

Refactor: Split monetizable_spec.rb into smaller files#784
RubenIgnacio wants to merge 6 commits into
RubyMoney:mainfrom
RubenIgnacio:improve_specs_orgnization

Conversation

@RubenIgnacio

Copy link
Copy Markdown

The monetizable_spec.rb file had grown to over 1,000 lines, making it increasingly difficult to navigate, maintain, and add new test cases. To improve readability and maintainability, I refactored the test suite by splitting monetizable_spec.rb into smaller, focused files based on the functionality they test.

This is purely a structural refactor. No test logic was changed, added, or removed. I extracted specific describe and context blocks from the main spec file into a new monetizable/ directory. The specs are now organized functionally:

monetizable
├── assignment_spec.rb
├── currency_for_spec.rb
├── error_handling_spec.rb
├── monetized_attributes_spec.rb
├── read_monetized_spec.rb
├── register_currency_spec.rb
├── validations_spec.rb
└── write_monetized_spec.rb
monetizable_spec.rb

@RubenIgnacio RubenIgnacio changed the title Improve specs orgnization Refactor: Split monetizable_spec.rb into smaller files Jun 5, 2026
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