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

Test fixes #426

Merged
merged 4 commits into from
Jan 16, 2024
Merged

Test fixes #426

merged 4 commits into from
Jan 16, 2024

Conversation

jkraemer
Copy link
Contributor

While trying to run the tests locally, I had to make a few changes to make things work:

  • MiniTest has apparently been renamed to Minitest at some point (this apparently also broke the most recent CI runs)
  • Schema files have to use force: :cascade so the recreation of the schema does not fail because of dependencies (at least on PostgreSQL)
  • the tag_examples module was evaluated as actual tests while trying to run any different test file, leading to hundreds of errors. Just requiring it where it's needed seems to help with that.

Now I am at the point where all tests except the parallel_test are running fine, but that's a separate topic :)

Otherwise it's specs would be loaded / run out of context leading to
many errors like this:

  1) Error:
TagExamples::from empty db::lowest_common_ancestor#test_0009_is itself for single item:
NameError: uninitialized class variable @@described_class in TagExamples
Did you mean?  describe
    /closure_tree/test/support/tag_examples.rb:10:in `block (2 levels) in <module:TagExamples>'

when trying to run a single test, i.e.

bundle exec rake test TESTOPTS="--seed=10410" TEST=test/closure_tree/parallel_test.rb
- same as specs, fixes parallel_test
@jkraemer jkraemer mentioned this pull request Nov 22, 2023
@seuros seuros merged commit cd2fac1 into ClosureTree:master Jan 16, 2024
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.

2 participants