If possible your code should detect features, not browsers. But sometimes you just need to sniff the browser. And when...
When you need to store structured data (like Ruby hashes) in a single database column with ActiveRecord, a simple way...
RSpec let's you chain a matcher with .or. The expectation will then pass if at least one matcher matches...
A matcher is a function that returns an object with a compare key. Usually it is registered with beforeEach...
If your rails application is unable to send mails, it might be useful to debug your settings using the rails...
CarrierWave comes with some RSpec matchers which will make testing more comfortable. Let's say you have an Uploader like...
When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself.
For applications coming with lots of stylesheets and scripts, asset compilation might take quite long. This can be annoying when...
You might have some trouble running a Rails LTS 2 app with MySQL 5.7. If you don't want to...
The httpclient gem comes with a custom SSL cert store. While an customizable, application-level cert store is great when...
We often use the Then console step from spreewald in combination with geordi vnc from geordi to debug tests within...
When flagging a spec that will be implemented later as pending, include a failing spec body or RSpec 3 will...
I recently had fun with replacing a custom video plattform ("mycustomtv") in one of our applications. I learned a lot...
When you have a pending Cucumber step (or feature) that also uses an existing VCR cassette, your pending test may...
Katapult 0.3.0 brings Rails 5 and Ruby 2.5 support with a new design, plus a ton of smaller features, fixes...
This cucumber step is useful for testing an image (looking at the src of the image). Then(/^I should see...
To check which elements an ActiveRecord relation contains use the contain_exactly matcher. describe User do let!(:admin) { create(:user...
This is a small example on how you can check if your Postgres index can be used by a specific...
The issue: You are using stub_const to change a constant value for your test. stub_const "SomeClass::CONST", 'test...
This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.
Rails applications and ruby gems should have a README that gives the reader a quick overview of the project. Its...
wrap the text with a span use line-height for the spacing between lines ("margin")
Situation: You want to write a spec for a function inside an Angular service. This function at some point makes...
If you try to listen to events on elements that are nested inside a , Firefox will stop event propagation once...