RSpec: be_true does not actually check if a value is true

be_true matches any truthy value, not only true; be_false likewise checks for falsiness. Use exact equality with == or eq when boolean values must be verified.

Webpacker: Disable source maps

Disabling source maps in Webpacker can reduce exposed code and simplify builds. Set config.devtool = 'none' in an environment-specific webpack config.

Obfuscating data in Rails applications for screenshots and demonstrations

Real data makes demos and screenshots look convincing, but names and values need masking to avoid exposing sensitive information. Faker can quickly replace personal details with plausible placeholders.

Article "Pricing Experiments You Might Not Know, But Can Learn From"

Pricing decisions are hard to get right, and small changes can affect revenue and customer response. Practical pricing experiments offer ideas for improving pricing strategy.

lorempixel - placeholder images for every case

Placeholder image generation for specific dimensions and topics is useful when building layouts, prototypes, or content mockups without final artwork.

Subtle Patterns Preview

Preview Subtle Patterns textures on a site without swapping images or changing CSS.

Updated: Check whether an element is visible or hidden with Javascript

Determining whether an element is truly visible in the browser can differ across JavaScript libraries; jQuery and Prototype use different visibility rules.

Loading half a billion rows into MySQL

Bulk loading huge datasets into InnoDB can take hours or days and strain disk, logs, and indexes; careful tuning keeps imports from dragging on indefinitely.

Letter Opener

Preview email in the browser instead of sending it, making message review and debugging easier during development.

What's My DNS? Global DNS Propagation Checker

Check a hostname’s current IP address and DNS records against name servers worldwide to verify DNS propagation after zone changes.

ActiveSupport::StringInquirer

Wrapping a string in this class gives you a prettier way to test for equality.

plus2/whereuat - GitHub

Adds a slide out panel to your Rails application that directs clients to test stories that have been marked as 'delivered' in Pivotal Tracker.

Run a rake task in all environments

Use like this:

power-rake db:migrate VERSION=20100913132321

By default the environments development, test, cucumber and performance are considered. The script will not run rake on a production or staging environment.


This script is part of our geordi gem on github.

defunkt's fakefs at master - GitHub

A fake filesystem. Use it in your tests.

Railscheck project home page

This project is (or will be) a best effort semi-static verifier for your Ruby on Rails projects. Delivered as a Ruby gem it provides a shell command task "railscheck" that you can run against your Rails projects to test for a number of typical bugs, potential problems and inconsistencies.

Integrity | The easy and fun automated continuous integration server

Integrity is the angel watching over your shoulder while you code. As soon as you push your commits, it builds, runs your tests, and makes sure everything works fine.

mdub's sham_rack at master - GitHub

Or, you can test your Rack application (or Sinatra, or Rails, or Merb) using arbitrary HTTP client libraries, to check interoperability.

citrusbyte's contest at master - GitHub

Write declarative tests using nested contexts without performance penalties. Contest is less than 100 lines of code and gets the job done.

thumblemonks's riot at master - GitHub

Riot differs primarily in that it does not rerun setup for each test in a context.

Unit Testing Achievements

  • Unlock achievements for running your test suite!

Localized external services - GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS

ShamRack mounts a Rack app locally, just for your tests. It goes one further: it “mounts” it using Net::HTTP such that requests to the Rack app never hit any network.

mynyml's holygrail at master - GitHub

The Holy Grail of testing for front-end development; execute browser-less, console-based, javascript + DOM code right from within your Rails test suite.

Properly require your "spec_helper"

Different require paths for spec_helper can execute the same file multiple times in Ruby 1.8; using one consistent require 'spec_helper' avoids duplicate loading.

How to make RubyMine aware of Cucumber steps defined in gems

RubyMine can flag Cucumber steps from gems as undefined because external step definitions are not linked by default. Adding the gem under Cucumber settings restores navigation and resolution.