patricklindsay / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
http://wicegrid.herokuapp.com/
MIT License
33 stars 29 forks source link

Port over old test suite #6

Closed patricklindsay closed 6 years ago

patricklindsay commented 6 years ago

This task is part of the Setup CI Build project.

Task involves;

Anyone is most welcome to take on this task. If you submit a PR once you start working on it I will assign you.

I'd suggest breaking the work down by first porting over the test suite and creating a PR then working through the failures 1 by 1. That way if multiple people want to work on fixing the tests we can add a task list in the PR.

JasonBarnabe commented 6 years ago

With the PRs submitted (#17, #18, #19, #20), the test suite generally passes. There are some flaky tests that sometimes pass and sometimes fail that we'll need to figure out.

patricklindsay commented 6 years ago

Interesting.. I still get 29 failures. Most of them due to relationship issues. Couple of the most common -

undefined method `belong_to' for #<RSpec::ExampleGroups::Task:0x007fb2ba094420>
 expected #<Project:0x007fb2b9eda620> to respond to `has_many?`

Might be that I'm running Rails 5.2.0. If we could reduce the test time (and remove the debug logging) it would be great to get those tests running on multiple versions of 5.

JasonBarnabe commented 6 years ago

If you get failures then it's not a true representation of how long the tests actually take. Let's see how long a green suite takes. On one of my machines, master currently passes and takes 5 minutes for all tests. On another, I'm getting 149 failures and it takes 8 minutes.

For the number and kind of tests we have, 5 minutes is reasonable. But of course faster is better.

JasonBarnabe commented 6 years ago

belong_to is a method defined by https://github.com/thoughtbot/shoulda-matchers. I'm not sure how you're getting this to fail as this is listed as a development dependency.

You said you're running Rails 5.2.0, but the app is not marked as compatible with this. Are you changing the gemspec? And it do the tests still fail if you don't? It may be shoulda-matchers does not support Rails 5.2.