Checking Code coverage in Rails with simplecov

Опубликовано: 12 Октябрь 2024
на канале: David Parker
2,795
27

After you've begun writing automated tests for your application, the next thing to know is how much surface area do your tests cover? Meaning, how much of your code is actually being tested?
With simplecov gem, we can detect which lines are being run during a test, and with a nice simple interface, we can see what still needs to be tested.

🤯 Contribute on Patreon
  / davidwparker  
https://www.buymeacoffee.com/davidwpa...

⏱️ Timestamps:
00:00 - Introduction
00:40 - Final result
00:50 - setup
02:20 - example

💌 Newsletter:
https://www.programmingtil.com/

🪐Elsewhere:
Twitter:   / davidwparker  
Twitter:   / programmingtil  
GitHub: https://github.com/davidwparker

💭Concepts:
simplecov gem
automated testing

📚Resources:
https://github.com/davidwparker/progr...
https://github.com/colszowka/simplecov

🎬 Subscribe!
http://bit.ly/subdavidwparker

My name is David W Parker and I’m creating and publishing videos on ProgrammingTIL to help teach anyone and everyone who wants to code. I’m a huge fan of Ruby on Rails, Svelte, and WebGL. I’ve used React a lot in the past, as well as some Vue and AngularJS. I’ve done some professional Python and Django as well. I like to create real applications and my tutorials will walk you through how to build something real from beginning-to-end.

#ruby #rails #rubyonrails