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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌶️ Active Record Tests #120

Open
rsamoilov opened this issue Jan 9, 2025 · 4 comments · May be fixed by #133
Open

🌶️ Active Record Tests #120

rsamoilov opened this issue Jan 9, 2025 · 4 comments · May be fixed by #133
Assignees
Labels
good first issue Good for newcomers

Comments

@rsamoilov
Copy link
Member

Description

Rage supports Active Record 6.0+, and being fully compatible with all relevant Active Record versions is a major goal for the framework.

Yet, the biggest missing piece in our test suite is test cases against different Active Record versions. Probably, the best tool to implement such kind of tests would be Appraisal.

Ideally, we would have a separate test suite that would run independently of the main test suite and would allow us to test parts of the framework that are dependent on external gems against different versions of those gems.

Let's start with covering the following methods with tests:

  • ActiveRecord::Base.connection_pool.with_connection
  • ActiveRecord::Base.connection_pool.connection
  • ActiveRecord::Base.connection_pool.release_connection
  • ActiveRecord::Base.connection_pool.active_connection?

Tips

@rsamoilov rsamoilov added the good first issue Good for newcomers label Jan 9, 2025
@theomelo
Copy link

I want to tackle this one 🙏

@rsamoilov
Copy link
Member Author

Woohoo! Go for it! And let me know if there’s anything I can help with.

@theomelo
Copy link

theomelo commented Mar 6, 2025

I just opened a draft pull request so you can check if I'm on the right track. 🙏

Regarding this note:

Ideally, we would have a separate test suite that would run independently of the main test suite and would allow us to test parts of the framework that are dependent on external gems against different versions of those gems.

Does this mean you want a separate GitHub Action or Step to run these independently? Instead of changing line 36 from .github/workflows/main.yml to run with Appraisal, we would scope just the new tests from ActiveRecord. Is my assumption correct?

@rsamoilov
Copy link
Member Author

Is my assumption correct?

Yes, that's right! I've commented on the PR.

@theomelo theomelo linked a pull request Mar 11, 2025 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants