rspec.info

RSpec let's you chain a matcher with .or. The expectation will then pass if at least one matcher matches...

There are two ways within systemd to manage the fact that you need the gluster service active before mounting the...

If your rails application is unable to send mails, it might be useful to debug your settings using the rails...

makandra dev
rubydoc.info

CarrierWave comes with some RSpec matchers which will make testing more comfortable. Let's say you have an Uploader like...

jsfiddle.net

When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself.

If the argument list is the same every time: expect(object).to receive(:foo).with('argument').and_return('response 1...

When you find yourself constantly ignoring a RubyMine warning, you can simple disable that warning and de-clutter your editor...

You might have some trouble running a Rails LTS 2 app with MySQL 5.7. If you don't want to...

You need to update a lof gems. Make sure you don't have any version constraints in your...

We often use the Then console step from spreewald in combination with geordi vnc from geordi to debug tests within...

makandracards.com

In Spreewald 1.10.4+, nested patiently blocks are now patient. Here is an example: patiently do outer_code patiently do

web.archive.org

When flagging a spec that will be implemented later as pending, include a failing spec body or RSpec 3 will...

When you have a pending Cucumber step (or feature) that also uses an existing VCR cassette, your pending test may...

makandra dev
github.com

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...

github.com

The issue: You are using stub_const to change a constant value for your test. stub_const "SomeClass::CONST", 'test...

blog.bigbinary.com

This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.

Situation: You want to write a spec for a function inside an Angular service. This function at some point makes...

By default, browsers will not wrap text at syllable boundaries. Text is wrapped at word boundaries only. This card explains...

httpie.org

HTTPie consists of a single http command designed for painless debugging and interaction with HTTP servers, RESTful APIs, and web...

PostgreSQL supports the SQL OVERLAPS operator. You can use it to test if two date ranges overlap: => SELECT ('2001-02...

Summary: Don't add chromedriver-helper to the Gemfile the executables might break your tests in projects where chromedriver-helper...