Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] TypeError: superclass mismatch for class AlertsControllerTest #1589

Merged
merged 2 commits into from Jan 28, 2020

Conversation

Martouta
Copy link
Contributor

I wanted to test an issue from the rails 5 branch and I encountered an unrelated error:
image

The problem was that this class was defined twice but with a different superclass so it is not monkey-patching it but defining it again.
image

The problem is that one is the functional and the other one is the integration. Functional tests are deprecated so I moved it to integration and I also slightly refactored the test.

This changes works for any Rails version 馃槃

@Martouta Martouta requested a review from a team January 27, 2020 19:34
@Martouta Martouta self-assigned this Jan 27, 2020
@Martouta Martouta changed the title [Bugfix] TypeError: superclass mismatch for class AlertsControllerTest [WIP][Bugfix] TypeError: superclass mismatch for class -AnyFunctionalTest- Jan 27, 2020
@Martouta Martouta changed the title [WIP][Bugfix] TypeError: superclass mismatch for class -AnyFunctionalTest- [Bugfix] TypeError: superclass mismatch for class -AnyFunctionalTest- Jan 27, 2020
duduribeiro
duduribeiro previously approved these changes Jan 27, 2020
Copy link
Contributor

@duduribeiro duduribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a 馃拝 comment but looks good to me :shipit:

cinstance1, cinstance2 = [buyer1, buyer2].map { |buyer| FactoryBot.create(:simple_cinstance, plan: plan, user_account: buyer) }
[cinstance1, cinstance2].each { |cinstance|FactoryBot.create(:limit_alert, account: provider, cinstance: cinstance) }


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you get rid of this multiple spaces?

Copy link
Contributor

@hallelujah hallelujah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3 馃殌

@Martouta Martouta merged commit 1c10ca0 into master Jan 28, 2020
@Martouta Martouta deleted the fix-AlertsControllerTest-superclass-mismatch branch January 28, 2020 10:32
@Martouta Martouta changed the title [Bugfix] TypeError: superclass mismatch for class -AnyFunctionalTest- [Bugfix] TypeError: superclass mismatch for class AlertsControllerTest Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants