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...
This will give the target site full access to your Javascript environment through window.opener, if the target is on the...
Don't write resources :people, :concerns => :trashable Write resources :people do concerns :trashable end Why Writing a controller...
If you want to configure your nginx to drop connections to a specific location, you can do so by responding...
TL;DR There are three dimensions you can control when scoping routes: scope module: 'module', path: 'url_prefix', as: 'path...
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...
Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...
If you expect method calls in RSpec 3, be aware that the argument matchers use very liberal equality rules (more...
In JavaScript we often use Immediately Invoked Function Expessions (or IIFEs) to prevent local variables from bleeding into an outside...
Don't use be_true to check if a value is true. It actually checks if it anything other than...
I got this error when running Rails 2.3 tests for Rails LTS. More stacktrace: NoMethodError: undefined method `cache' for Gem...
Geordi is now (partially) tested with Cucumber. Yay! geordi cucumber supports a new @solo tag. Scenarios tagged with @solo...
Using Scenic, you can bring the power of SQL views to your Rails application without having to switch your schema...
Note The maintenance mode is enabled on all application server as soon as the file /public/system/maintenance.html is present. Installation
Ever wondered how you can create a simple table output in bash? You can use the tool column for creating...
A comprehensive script to convert test suites from RSpec 2 to RSpec 3. This converts more than should/expect syntax.
Once Rails knows a given string is html_safe, it will never escape it. However, there may be times when...
Remove some old binaries (commands still exist in geordi) and mark others as deprecated Rewrite deploy command to support...
Until recently, you could open a new tab via window.open when using execute_script in Selenium tests. It no longer...
Regular expressions in Javascript are represented by a RegExp object. There also is a regex literal as in many other...
You know that Devise offers RSpec test helpers for controller specs. However, in request specs, they will not work.
Ruby has the class Proc which encapsulates a "block of code". There are 2 "flavors" of Procs: Those with "block...