Efficient Rails Test-Driven Development, Class 1 of 6

Efficient Rails Test-Driven Development, Class 1 of 6

Photo Max Walker
NewCircle, Inc.
Member since Sep 29, 2010
Stream Posts: 322
Posted on Nov 08, 2010 (5 years ago)
Seen 7090 times.
Tagged As:
This video is of Class 1 from Wolfram Arnold's stellar six-week class Efficient Rails Test-Driven Development, which he taught at BlazingCloud back in July 2010.

In this series, experienced Rails engineer and consultant, Wolfram Arnold applies a real-world perspective to teaching you effective patterns for TDD.

In this first of six classes, Wolf covers:
  • The economics of testing
  • Testing in layers, design patterns
  • Toolbox: RSpec with Rails
  • RSpec & Models

Each week, we'll make the next video in this series available online. So, stay tuned! In the meantime, stop by TechTV to satisfy your hunger for great educational content on open source development.

Class 1 Class 2 Class 3 Class 4 Class 5 Class 6

You can grab the source code for these classes here.

Here's the video for Class 1:

...and here are the slides:

This post is part of Efficient Rail Test-Driven Development Course


You have to login to post a comment.
Posted on Jun 24, 2012 (3 years ago)
Member since Jun 24, 2012
If you use the spec suggested at 1:22:00 (and in the code on Github) [code]it 'must have a first_name' do p = Person.new p.should_not be_valid # calls p.valid? p.errors.on(:first_name).should_not be_nil end it 'must have a last_name' do p = Person.new p.should_not be_valid # calls p.valid? p.errors.on(:last_name).should_not be_nil end [/code] ...you could remove one? of the [b]validates_presence_of[/b] checks for first_name or last_name and it will still pass, which is funny as this is the spec that was meant to lead to adding validates_presence_of through tdd. One of the students mentioned this in the vid, which was why the errors.on check was added, but this addresses the wrong problem. ...I think. Otherwise fantastic vid, thanks heaps for sharing it with us.