Rails default config uses the ActiveSupport::Cache::NullStore and disables controller caching for all environments except production: config.action_controller.perform_caching = false...

Nowadays it is fairly easy to intercept and modify mails globally before they are sent. All you have to do...

Webmocks hash_including is similar to RSpec::Mocks::ArgumentMatchers#hash_including. Be aware that hash_including (webmock v3.0.1) doesn't...

Middleman is a static page generator that brings many of the goodies that Rails developers are used to.

rspec.info

In modern default RSpec configurations, your tests are usually run in random order. This helps to detect "flickering" tests that...

Some pseudo-elements need to be addressed with vendor prefixes. E.g. ::selection is not supported by Firefox, you need to...

makandra dev
iamvdo.me

Line-height and vertical-align are simple CSS properties. So simple that most of us are convinced to fully understand...

stackoverflow.com

This error message may occur when rspec gets loaded by rake, e.g. when you migrate the test database. NoMethodError: undefined...

makandra dev

You may know the double asterisk operator from Ruby snippets like Dir['spec/**/*_spec.rb'] where it expands to an arbitrary...

In general, you should not put a block element inside an inline element. So don't do this: text

github.com

We have released a new library Gemika to help test a gem against multiple versions of Ruby, gem dependencies and...

makandra dev
github.com

Improve geordi cucumber: Only attempt @solo run when the specified files contain the @solo tag, skip @solo run if any...

Capistrano is by default configured to exclude the gems of the groups development and test when deploying to the stages...

You want Spring for super-fast binstubs like bin/rails or bin/rspec which avoid Rails boot time. You want parallel_tests...

When you're nesting setTimeout(f, 0) calls, your browser will silently increase the delay to 5 milliseconds after the...

Reading user input in console applications is usually done using Kernel#gets. Stubbing that can be a bit hairy.

When testing Ruby code that prints something to the terminal, you can test that output. Since RSpec 3.0 there is...

relishapp.com

When you find yourself in the situation that you would like to define a custom matcher in your specs, but...

Expecting a primitive value as an argument to a method invocation is easy: expect(object).to receive(:foo).with('arg1...

gist.github.com

The NestedHash class allows you to read and write hashes of any depth. Examples: hash = {} NestedHash.write hash, 'a', 'b', 'c...

RSpec provides a nice diff when certain matchers fail. Here is an example where this diff is helpful while comparing...

Don't write resources :people, :concerns => :trashable Write resources :people do concerns :trashable end Why Writing a controller...

Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...

RSpec supports a one-liner syntax for setting an expectation on the subject: describe Array do describe "when first created...