How to enable template coverage support for simplecov
Since Ruby 3.2.0
Show archive.org snapshot
you can measure coverage support for eval
statements and
support has been added for the simplecov gem as well
Show archive.org snapshot
.
This allows to track coverage across ruby templates such as haml, erb, ...
Simply set this within simplecov
SimpleCov.start do
enable_coverage_for_eval
end
Related cards:
WProofreader: How to manually enable for a WYSIWYG editor instance (with CKeditor 4 example)
WProofreader is a spelling and grammar checking tool that integrates with textareas and numerous WYSIWYG editors.
While it usually activates automatically, depending on your application, it may fail to boot.
In my case, an application was using C...
How to enable pretty IRB inspection for your Ruby class
When Ruby objects are inspected in any modern IRB, some objects (like ActiveRecord instances) are rendered with neat colors and line breaks.
You will not get that for custom classes by default -- which can be annoying if your inspection contains l...
How to use Simplecov to find untested code in a Rails project with RSpec and Cucumber
Simplecov is a code coverage tool. This helps you to find out which parts of your application are not tested.
Integrating this in a rails project with rspec, cucumber and parallel_tests is easy.
- Add i...
How to enable Chromedriver logging
When using Chrome for Selenium tests, the chromedriver
binary will be used to control Chrome. To debug problems that stem from Selenium's Chrome and/or Chromedriver, you might want to enable logging for the chromedriver itself. Here is how.
...
How to revert features for deployment, merge back, and how to stay sane
Removing features and merging those changes back can be painful. Here is how it worked for me.\
tl;dr: Before merging back: reinstate reverted features in a temporary branch, then me...
How to: Rails cache for individual rspec tests
Rails default config uses the ActiveSupport::Cache::NullStore
and disables controller caching for all environments except production:
config.action_controller.perform_caching = ...
RubyMine / IntelliJ: How to increase UI and fonts for presentations
When giving a presentation where you do some coding, the font size you usually use is probably a bit too small and makes code hard to read for users on smaller screens or low-bandwidth connections when the image quality is lower.
Here are two sol...
Firefox: Inspecting mixed content warnings (and how to enable them)
Having your site run on SSL is worthless when you include content over an unsafe connection (HTTP).
Here is how to hunt down mixed content with Firefox.
How to enable mixed content alerts
If your Firefox does not warn you about mixed content ...
How to enable the Thinkpad microphone mute key on Ubuntu 16.04
While the hardware mute button of my Lenovo x230 worked on Ubuntu 14.04 out of the box, it does not on Ubuntu 16.04. It is fairly simple to fix, though.
There is an extensive answer on Ask Ubuntu, but only part o...
How to enable SSL in development with Passenger standalone
Here is how to start your Rails application to accept both HTTP and HTTPS in development.
-
gem install passenger
-
Create a [self-signed SSL certificate](https://makandracards.com/makandra/15901-howto-create-a-self-signed-certificate...