daru icon indicating copy to clipboard operation
daru copied to clipboard

Enhance specs style

Open zverok opened this issue 8 years ago • 5 comments

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.

zverok avatar Mar 05 '17 12:03 zverok

I am interested in tackling this. I will be working on it this week.

dshvimer avatar Mar 06 '17 04:03 dshvimer

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.

dshvimer avatar Mar 06 '17 22:03 dshvimer

Yes, please list your progress & PRs just in this issue.

zverok avatar Mar 07 '17 09:03 zverok

File Status PR
spec/io/sql_data_source_spec.rb Merged link
spec/io/io_spec.rb In Progress

dshvimer avatar Mar 15 '17 02:03 dshvimer

@dshvimer any update on this? Are you going to work on io_spec?

v0dro avatar Aug 14 '17 17:08 v0dro