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

Rewrite tests with RSpec #218

Merged
merged 29 commits into from
Jan 10, 2023
Merged

Rewrite tests with RSpec #218

merged 29 commits into from
Jan 10, 2023

Conversation

ahangarha
Copy link
Contributor

@ahangarha ahangarha commented Dec 1, 2022

All tests were rewritten in RSpec.

WIP:

I didn't squash commits to keep the history for review.

For review please check two files more carefully:

  • helper_spec.rb (if there is a better way rather than extending modules)
  • webpack_runner_spec.rb (if the expectation is the intended one. I have changed the way it tests the result)

Also regarding binstubs, I ensured that not only do we check if we have added the relevant files in bin directory, but also only those files are added. This not only resolves the mentioned issue, but it might also be helpful to force any future changes for binstubs to be reflected in our tests.

@justin808
Copy link
Member

@ahangarha many added files. Are some being deleted?

@ahangarha
Copy link
Contributor Author

Yes. Minitests should be deleted.

Since these files are mapping minitest files, we can modify commits in a way that we dont delete old files and create new ones. Is this more desirable?

@tagliala
Copy link
Contributor

tagliala commented Dec 3, 2022

Hi,

Just out of curiosity, can I ask the main reasons behind this change?

@justin808
Copy link
Member

We'll make the tests more similar to the test suite of https://github.com/shakacode/react_on_rails.

@justin808
Copy link
Member

Yes. Minitests should be deleted.

@ahangarha you can delete the old ones if you're sure that they're all covered.

@ahangarha ahangarha force-pushed the rewrite-tests-with-rspec branch from fb287c5 to 388203f Compare December 6, 2022 10:14
@ahangarha ahangarha changed the title WIP - Rewrite tests with RSpec Rewrite tests with RSpec Dec 6, 2022
@ahangarha ahangarha marked this pull request as ready for review December 6, 2022 10:24
@tomdracz
Copy link
Collaborator

tomdracz commented Dec 6, 2022

Lots to go through but looks good to me so far! 🎉

@ahangarha
Copy link
Contributor Author

ahangarha commented Dec 15, 2022

Yes. Minitests should be deleted.

@ahangarha you can delete the old ones if you're sure that they're all covered.

@justin808
All the test cases (268) are rewritten in RSpec and Minitests are removed. Not only they are covered, but some minor bugs in two of them are also addressed. As long as there is no issue with the implementation of the two mentioned files in the PR description, all is good.

I have just noticed that rake test doesn't work. The default task to run with rake is set to be spec which runs RSpec. I think this is the last piece to be addressed for this PR. If needed, I change spec to test to be compatible with what we had before.

Update:
With 4e38061 I have set rspec to be run by test task.

@ahangarha ahangarha changed the title Rewrite tests with RSpec WIP - Rewrite tests with RSpec Dec 24, 2022
@ahangarha ahangarha force-pushed the rewrite-tests-with-rspec branch 2 times, most recently from 0c01ec7 to 8a6e659 Compare December 28, 2022 21:09
@ahangarha ahangarha force-pushed the rewrite-tests-with-rspec branch from 2fb986e to 8a6e659 Compare January 3, 2023 13:12
@ahangarha ahangarha force-pushed the rewrite-tests-with-rspec branch from 66a01a4 to 6168195 Compare January 9, 2023 12:58
@Judahmeek Judahmeek requested a review from justin808 January 9, 2023 19:44
@ahangarha ahangarha requested review from justin808 and removed request for justin808 January 9, 2023 20:39
@ahangarha ahangarha merged commit 6c3ef9c into master Jan 10, 2023
@ahangarha ahangarha deleted the rewrite-tests-with-rspec branch January 10, 2023 08:04
@ahangarha ahangarha changed the title WIP - Rewrite tests with RSpec Rewrite tests with RSpec Jan 10, 2023
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

Successfully merging this pull request may close these issues.

Working tree not clean when running bundle exec rake
6 participants