daru
daru copied to clipboard
Enhance specs style
Our specs had grown "organically", and many of them use outdated style of testing things (all bootstrap & several checks is made inside single example, tons of hard-to-read large objects created on the fly, instance variables are used instead of let and so on).
What should be done in this ticket is:
- Refactoring of specs in accordance with BetterSpecs guidelines;
- Making specs more clean/DRY (only several different dataframes are created as a test subjects, covering most of the situations)
- Probably, splitting large specs files into smaller ones (e.g. for dataframe -- basic functionality, math, output, import/export...)
- Consider turning on Rubocop for specs files (with probably some cops turned off or tuned in
spec/.rubocop.yml) - Consider introducing rubocop-rspec for rspec-specific checks (initially turned off, then turned on file-by-file & cop-by-cop)
As the full solution for the ticket will touch all spec/**/*.rb files, it is advised to make several PRs (one PR per one spec file, or one PR per one problem solution).
You can rely on my (@zverok) advices and reviews while working on this ticket.
I am interested in tackling this. I will be working on it this week.
I think that since this a fairly large task. More than one person can contribute at any given time. I will list the files that I am working on as I begin to work on them and others should do the same.
Yes, please list your progress & PRs just in this issue.
| File | Status | PR |
|---|---|---|
| spec/io/sql_data_source_spec.rb | Merged | link |
| spec/io/io_spec.rb | In Progress |
@dshvimer any update on this? Are you going to work on io_spec?