Skip to content

Instantly share code, notes, and snippets.

@sidonath
Last active December 15, 2015 11:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sidonath/5253885 to your computer and use it in GitHub Desktop.
Save sidonath/5253885 to your computer and use it in GitHub Desktop.
Resources relevant to the "Prepare your application for the old age" talk given at Sarajevo Ruby Meetup (21 March 2013)

Prepare your application for the old age

Since I didn't have any slides during the talk, here are some resources that cover similar topics and/or were mentioned during the talk itself.

Happy hacking!

Various articles related to the talk

The article that inspired the talk: The Startup Trap.

Also check out the follow-up on reasoning when we should NOT write tests: The Pragmatics of TDD.

Alternative way of setting up Rails testing stack with unit/integration/acceptance tests: How I Test Rails Applications

This deck always inspires me to write better tests and better code: Why Our Code Smells

A list of various testing tools

Rspec: I use it for testing, but the opnions about it are devided (DHH, for one, hates it).

Minitest: this is now a default testing framework in Rails 4.0. It can be used in two ways: similar to the Ruby's Test::Unit or with the syntax similar to RSpec.

Tools when testing with RSpec (may or may not apply to Test::Unit and Minitest)

Spork: a test server that makes invidual tests run faster because it doesn't need to load Rails for every test.

Guard::RSpec: integration of RSpec with Guard (a command line tool to detect changes in filesystem) that allows one to run specs whenever a file is changed.

Capybara: a tool to help you write acceptance tests ("feature specs" in RSpec). It also supports running full-stack tests, ie. running JavaScript in tests through Selenium (which launches an automated browser window).

To run full-stack tests headlessly (so that a real browser doesn't need show up in tests), you can install PhantomJS and use Poltergeist gem.

Testing JavaScript code

Konacha: testing framework for JS that integrates into the Rails asset pipeline. You can run tests headlessly with Poltergeist (see above).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment