Don't Google this, you will lose all will to live. Instead use Object#isEqual() from Lodash or Underscore.js:

gist.github.com

Rails 2.3.16+ on Ruby 1.9 causes warnings like this: .../gems/activesupport-2.3.17/lib/active_support/core_ext/string/output_safety.rb:22: warning: regexp match /.../n against to UTF-8 string...

makandra dev
relishapp.com

You can define methods in any example group using Ruby's def keyword or define_method method. These helper methods...

TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...

makandra dev

Basic error pages To add a few basic styles to the default error pages in Rails, just edit the default...

progfu.com

I am talking about development speed. When your application starts growing and you start adding gems, it starts to take...

makandra dev
github.com

The gem author Jonas Nicklas highlights in a Google Groups post that the release is not backwards compatible to 1...

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

web.archive.org

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

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

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

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

When you develop a gem and you have a Gemfile in your project directory, you might be surprised that your...

makandra dev

Consul 0.4.0 comes with some new features. Dependencies Consul no longer requires assignable_values, it's optional for when you...

makandra dev

Test suites usually grow over time as more and more development time is spent on a projects. Overall run-time...

If you use rails_admin, your specs pass with the rspec binary, but not using rake spec (or rake parallel...

makandra dev

RSpec's be_false behaves unexpectedly: nil.should be_false # passes, as the expectation returns true If you want to check...

All our projects have enum-like requirements like this: An attribute value must be included in a given set of...

This only applies to RSpec below version 1.3.2. The issue has been fixed in RSpec 1.3.2, and most likely RSpec...

When your model is using a callback like before_save or before_validation to calculate an aggregated value from its...

Imagine you have 2 HTML boxes. The first one has a margin-bottom of let's say 30px and the...

You probably know about the possibility to tag scenarios in Cucumber to run your own piece of code before the...