-
Notifications
You must be signed in to change notification settings - Fork 39
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
Thoughts on Testing #2
Comments
Yeah sure get that I'm more than happy with those milestones you've stated. It offers me pretty good support until the dependency is removed. As for the tests. That sort of seems weird. I was thinking of moving all the association tests from paper_trail itself and keeping them only in the association plugin repo. It would be nice to have to be an easy way you can trigger/call the tests from my gem in your test suite, is that possible? |
I agree that should be the eventual goal, but I'd like to keep them in the paper_trail repo for a year or two (see suggested milestones above) to give me the confidence to release new versions of paper_trail, once it starts depending on this gem.
OK, I'll get the branch started. Once it's in place, feel free to open PRs against it. |
Okay fair enough but I think its important that I have these tests ready to go within this repo so I will duplicate them. If anything is added / removed related to the association tests try to make a PR or mention me if you can. |
I have prepped everything for the new |
Awesome, you're moving fast! I will probably have time to work on it this weekend. |
Branch created: https://github.com/paper-trail-gem/paper_trail/tree/remove_association_tracking Please take a look at the diff (paper-trail-gem/paper_trail@master...remove_association_tracking) and give me your feedback. |
Looks good. One thing that sucks is that I have to create/use a fork during testing just to remove the dependency I have now updated the plugin code. All specs are passing however I would like your comments on the following todo items:
|
We could do something a little crude like adding a conditional to the PT gemspec:
Would that help?
Awesome! It took a little fiddling with
I see you are overwriting eg. def record_create
version = super
update_transaction_id(version)
save_associations(version)
end In the same way, it should be possible to use
I think calling |
Yes I think the environment variable is a nice solution to that problem |
Maybe the method |
I made a PR to fix the return values for the record_* methods. Otherwise all patches have been improved on my end. Looks like were getting close. |
eae5ccf looks good, and CI for the When you're ready, please push a gem and I'll point the |
For some reason now I'm getting failing tests in Ruby 2.5 only (2.4 or 2.3 still passes normally). Do you have some insight to this? It appears to have started with eae5ccf but im having trouble determining the cause. Test seem fine on your end using the latest. |
Yes, CI of fafecfa is passing (https://travis-ci.org/paper-trail-gem/paper_trail/builds/385775323). I can't look into it further right now, need to get back to the day job 😁 |
I would like to begin testing the the
So, please let me know when you've signed up and I'll transfer it. |
The test suite is failing all sorts of randomly for ruby 2.5 only. Right now I'm a little stumped, tbh I'm not a test suite ninja yet. Once that's fixed the irrelevant tests must be removed from the test suite and then the first gem can be published. |
My current rubygems account is [email protected] |
Anything specific I can help with? PT CI, testing against the PT-AT gem I just pushed, is passing (https://travis-ci.org/paper-trail-gem/paper_trail/builds/387567399) So, from what I'm seeing I'm ready to merge the |
What tests are failing for you? I am noticing, in any version of ruby, that the |
Yep that was it. The error seems to be from setting the spy on the request object which must cause problems because its global. |
I wonder if spies are incompatible with the complicated combination of Making matters more confusing, why would these specs work fine in PT builds (https://travis-ci.org/paper-trail-gem/paper_trail/builds/387567399) and not in PT-AT builds? If it comes down to it, they are some of the least important tests in the suite, so I'm fine with deleting them. |
I'm done with all my todo items. Once the |
Merged! 🎉
In the PT
I can change the constraint to |
I would prefer |
Gem v1.0.0 released |
How are we going to test this repo? In paper-trail-gem/paper_trail#1070 I suggested the following milestones for this project:
So, theoretically this repo could live without tests for the time being. But, in practice, it'll probably be helpful to have tests anyway, if for no other reason than to give us the confidence to make releases.
It will certainly be possible to write isolated unit tests in this repo, the kind of tests that don't touch a database and rely heavily on mocks. That would be better than nothing, and we could rely on the paper_trail test suite for integration testing.
We can start a branch in the paper_trail repo for the purpose of early integration testing. In this branch, we would delete the association tracking implementation.
These are just some early thoughts. What have you been thinking?
The text was updated successfully, but these errors were encountered: