For Selenium tests, your browser starts in your local timezone, or whatever your system's environment specifies. This is usually...
Added methods to keep the line number steady while you time-travel between commits: Copy the file to a new...
There are several ways to run a single spec. I usually copy the spec file path with the line number...
In FactoryBot factories, Rails' file_fixture is not available by default. To enable it, include a support module from rspec...
Slow test suites are a major pain point in projects, often due to RSpec and FactoryBot. Although minitest and fixtures...
When handling nested hashes the RSpec output is often hard to read. Here the gem super_diff could help.
Starting with ChromeDriver 127, if your application displays a beforeunload confirmation dialog, ChromeDriver will immediately close it. In consequence, any...
With this command you can run all the spec files which have been edited or added in the current branch...
tl;dr To adjust code templates in RubyMine, navigate to Settings -> Editor -> File and Code Templates. Example You can navigate...
Modern JavaScript includes Intl.NumberFormat to format numbers in different formats and locales. In this card, we describe a wrapper for...
When you mocked method calls in RSpec, they are mocked until the end of a spec, or until you explicitly...
If an view spec crashes due to undefined helper methods, you can enable this option: # config/application.rb config.action_controller.include_all_helpers = true...
Raising errors for required and permitted attributes makes it easier to find errors in your application during development and in...
Note Using rem only ever makes sense when the root font size is dynamic, i.e. you leave control to the...
tl;dr Prefer request specs over end-to-end tests (Capybara) to joyfully test file downloads! Why? Testing file downloads
10.0.0 2024-03-07 Compatible changes console command: You can now globally disable the IRB multiline feature by setting irb...
You can chain multiple Capybara matchers on the page or any element: expect(page) .to have_content('Example Course')
A list of implementation details that make for a better / expected user experience. Have these in mind when implementing a...
Up until Chrome 120, scrollbars could only be styled using the various -webkit-scrollbar-* pseudo elements, e.g. to make the...
I recently noticed a new kind of flaky tests on the slow free tier GitHub Action runners: Integration tests were...
tl;dr We recommend configuring Selenium's unhandled prompt behavior to "ignore". When running tests in a real browser, we...
There are a few tools to combat the dreaded n+1 queries. The bullet gem notifies you of missing eager...
Here are some hints on best practices to maintain your tasks in larger projects. Rake Tasks vs. Scripts
Getting an entire test suite green can be a tedious task which involves frequent switches between the CLI that is...