Testing

Test-driven development, code coverage, and writing better specs.

Quick Tip: Cucumber Works-in-Progress

How to use the Cucumber tagging feature to tag scenarios.

rails testing how-to

Discover your missing specs

A rake task that finds app files without corresponding RSpec test files and generates them

rails testing how-to

Striving for 100 percent

Weighing the practical value of 100% code coverage versus focusing testing on high-impact functionality

testing code

Rails Testing Tips: Testing a helper with a block

Two approaches to testing a Rails helper method that accepts a block using RSpec

rails testing how-to

Rails Testing Tips: Stubbing controller methods in a helper test

In RSpec helper tests, the controller context is self -- use self.stub! to mock controller methods

rails testing how-to

Rails Testing Tips: Login gotcha

A workaround for testing controllers that require admin login from a different controller

rails testing how-to

Rails Testing Tips: Code Coverage

Using rcov to track test coverage in a Ruby on Rails project

rails testing

Rails Testing Tips: flash.now gotcha

How to test flash.now values that get cleared after rendering the view

rails testing how-to

Contracting

Finishing my first contract project and discovering Ruby on Rails testing along the way

rails testing business