ActiveModel::Errors is used to handle validation errors on Rails objects. If you inspect an instance, it feels like a...

If you require your Rails models manually, pay attention to the path you use. Unless you have...

makandra dev
github.com

Show failing specs instantly. Show passing spec as green dots as usual. Configuration: # spec/spec.opts (.rspec for rspec 2) --require rspec/instafail...

In a Rails application, *_spec.rb files get special treatment depending on the file's directory. E.g. when you put a...

makandra dev
github.com

Richard Powell presents a collection of CSS styling advice that's mainly taken from SMACSS. Although at makandra we're...

makandra dev
speakerdeck.com

The linked slidedeck holds many tips, of which I list the most interesting to me below DATA and END

Geordi now supports our solution for running Selenium tests without having Firefox or Chrome windows popping up all over your...

Chances are, something in your project uses the mathn library, which is known to cause infinite loops when rendering the...

This didn't work for me. Seems display is already taken in Machinist. # in spec/support/blueprints.rb Partner.blueprint do company_name

Never ever declare your associations with a string, especially when doing metaprogramming. A common mistake is something like # WRONG

web.archive.org

TL;DR Avoid before(:context) (formerly before(:all)), use before(:example) (formerly before(:each)) instead. If you do use before...

Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...

When you get an error like this: Invalid gemspec in [/opt/www/foo-project.makandra.de/shared/bundle/ruby/1.8/specifications/carrierwave-0.6.2.gemspec]: Illformed requirement ["# 1.1.4"] ... the machine's Rubygems needs to...

makandra dev

If a customer calls and tells you that she cannot see some content of her website beware of the following...

A print stylesheet is easy to create. Choose a font suited for paper, hide some elements, done. Unfortunately print stylesheets...

This works in modern RSpecs (RSpec >= 2.x) and Cucumbers: rspec spec/models/node_spec.rb:294:322 cucumber features/nodes.feature:543:563:579

RubyMine: Set specific Ruby version per project

Sometimes you need to look at the filter chain in specs. You can do it like that on Rails 2...

If you encounter a Firefox that does not care about your font settings but always uses specific fonts, you can...

Never name your shared example group *_spec.rb. Otherwise rspec will try to load your example group as a spec and...

github.com

Internet Explorer until version 9 has some limitations when parsing CSS files Summarized, these are: Up to 31 CSS files...

github.com

In Selenium features the server and client are running in separate processes. Therefore, when mocking time with a tool like...

Be careful when stubbing out attributes on records that are defined by associations. Nothing is as it seems to be...

Our rspec_candy gem now gives you three matchers: be_same_number_as Tests if the given number is the...