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

Testing functions should be moved out of production code #95

Closed
pik opened this issue Jul 26, 2015 · 4 comments
Closed

Testing functions should be moved out of production code #95

pik opened this issue Jul 26, 2015 · 4 comments

Comments

@pik
Copy link
Contributor

pik commented Jul 26, 2015

I don't know why this was originally authored in this way -- but this seems like particularly bad style, there is no reason these functions are required to be in the production code, rather than added specifically in the test setup.

https://github.com/mhenrixon/sidekiq-unique-jobs/blob/master/lib%2Fsidekiq_unique_jobs%2Fmiddleware%2Fclient%2Funique_jobs.rb#L9

https://github.com/mhenrixon/sidekiq-unique-jobs/blob/master/lib%2Fsidekiq_unique_jobs%2Fmiddleware%2Fclient%2Fstrategies%2Funique.rb#L5

https://github.com/mhenrixon/sidekiq-unique-jobs/blob/master/lib%2Fsidekiq_unique_jobs%2Fconnectors.rb#L1

@mhenrixon
Copy link
Owner

Totally agree on that!

@mhenrixon
Copy link
Owner

If you have any better suggestions I am all ears @pik

@pik
Copy link
Contributor Author

pik commented Jul 31, 2015

@mhenrixon Thanks for the response - I was hoping to make a PR for this (to patch the relevant classes from the spec_helper.rb or another one of the files which is loaded only on test) -- but I haven't had a chance to do this yet.

@mhenrixon
Copy link
Owner

@pik check current master if that make sense to you.

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

No branches or pull requests

2 participants