TheOdinProject / top-meta

TOP hub for ongoing support and improvement of the curriculum by the maintainers
32 stars 10 forks source link

Ruby on Rails testing lessons #214

Open linkonsat opened 2 years ago

linkonsat commented 2 years ago
Title Author Date
ROR TESTING mmincorporated today

IDEA NAME

Summary

Currently, the Rails section of the Ruby on Rails path does not have any testing content. The goal of this issue is to outline a structure and provide a single issue to discuss and keep track of ideas surrounding it.

Motivation

Testing is important both when applying and on the job. Having this knowledge will empower learners.

Suggested implementation

Testing lessons will consist of two parts. Standalone lessons that cover important aspects of testing and then additions to current lessons that briefly cover testing for that aspect of Rails. If a topic has a ? then this means it's still an idea and not an active item yet.

Standalone lessons

N/A

Alternatives

N/A

Additional

This can be any unanswered questions, things that still need to considered or solved about the implementation, any reference links to the initial ideation such as a Discourse Forum, discussions or anything else.

ChargrilledChook commented 2 years ago

I think the MVP for a testing section should cover unit / model specs and system specs.

All the other things would be great additions, but would be relatively easy to add on later in a modular way

KevinMulhern commented 2 years ago

Great write up @linkonsat, thanks for putting this together.

I agree with @ChargrilledChook, system testing and model unit tests would be the MVP. Jason Swett's types of tests article 100% aligns with all the testing experience I've had at various Rails jobs. It boils down to lots of unit tests, some system tests and rarely anything else.

The only things I'd add to the list are

The only things I'd remove from the list are

linkonsat commented 2 years ago

@KevinMulhern pretty much agree with all your points. For the stimulus controller would it be worth letting users know that there isn't a best way and that it can be rolled into system test then? Just so if a learner is asked that or something they are just aware of it.

JuanVqz commented 2 years ago

@KevinMulhern Request testing is the replacement for Controller testing, so, we can add them.

What do we want here?

KevinMulhern commented 2 years ago

@JuanVqz yeah thats a good point. We're planning on covering request specs in an API testing lesson: https://github.com/TheOdinProject/curriculum/issues/24492 🎉