【Rails】手動テストでカバレッジを計測する
https://qiita.com/tatsumi_t2/items/a1b399cb27716b441294?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
My friend Sean Miller has a blog post up : Adding GitHub Actions to Run RSpec and SimpleCov https://thewanderingcoder.com/2023/09/adding-github-actions-to-run-rspec-and-simplecov/ with repect to (as it says on the tin) #Ruby, #GithubAction #Rspec #SimpleCov and #CI
The constructive argument against it is that if you’re not using mutation testing you can’t really trust your code coverage metric. I like the reasoning behind this argument.
The new SimpleCov `enable_coverage_for_eval` option for use with Ruby 3.2 works great. Adding a new group for Views makes sense now. #ruby #simplecov
😎
Sunday night #Ruby tip:
I use #RSpec and #Simplecov quite a bit and created this little script in a file named `bin/coverage` that will open the coverage report HTML page in my default browser:
```sh
#!/usr/bin/env sh
set -e
if [[ -f ./coverage/index.html ]]; then
echo "[ bin/coverage ] 👖 Opening coverage report in your default browser..."
open ./coverage/index.html
else
echo "[ bin/coverage ] 🚨 No coverage report found! Run \"bin/rspec\" first."
exit 1
fi
```