Skip to content

DRY-up BogusCreditCard model and remove invasive refund spec stub#4002

Merged
kennyadsl merged 2 commits intosolidusio:masterfrom
nebulab:spaghetticode/models-cleanup
Apr 1, 2021
Merged

DRY-up BogusCreditCard model and remove invasive refund spec stub#4002
kennyadsl merged 2 commits intosolidusio:masterfrom
nebulab:spaghetticode/models-cleanup

Conversation

@spaghetticode
Copy link
Copy Markdown
Member

Description

This PR includes 2 commits that were originally proposed with this bugfix that targets v2.11. They're proposed also for the master branch, as they can be beneficial here as well.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

Success and failure messages are hardcoded in multiple methods, they
can be easily DRYed up by using constants, with the extra benefit that
these can be referenced also in subclasses and tests.
Stubs can make tests britte, especially ones that, although
presented in a unit test file, are actually integrating the
behavior of many classes. Specifically, being this stub defined
at the top level, it prevents writing specs that actually want
to hit the real implementation of the stubbed method. These seem
good enough reasons for removing it.
@kennyadsl kennyadsl merged commit 1856bf4 into solidusio:master Apr 1, 2021
@kennyadsl kennyadsl deleted the spaghetticode/models-cleanup branch April 1, 2021 06:52
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.

3 participants