(class 1 of 6) Efficient Rails Test-Driven Development - by Wolfram Arnold

UserGroupsatGoogle · 33K views · 2010 · 1:26:41

Open on YouTube

Testing, debugging & developer toolsWeb developmentPython, Ruby & scripting languagescoursedated

Why Stack Overflow recommends it

Stack Overflow users link it as a TDD/BDD video resource for Rails and as the course people follow when learning RSpec.

Recommended by 2 people across 2 different months, 2011 to 2012.

What it is

First of a six-part Rails testing workshop given by consultant Wolfram Arnold, recorded with Marakana and Sarah Allen of BlazingCloud.net. It covers the economics of testing, testing in layers, and using RSpec with Rails models.

What people said

Recommends user181677 · 2011-10 · Stack Overflow · on “TDD/BDD screencast/video resources”

Efficient Rails Test-Driven Development - by Wolfram Arnold Class 1 [this video] the economics of testing Testing in layers, design patterns Toolbox: RSpec with Rails RSpec & Models Class 2 [LINK] A culture of testing: Why TDD? How to TDD? Testing & Date Dependencies Toolbox: Fixtures, Factories, Mocks & Stubs Class 3 [LINK] Controller testing View, Helper, Routes Testing How much is enough? How much is too much? Class 4 [LINK] Refactoring code & tests, custom matchers API Testing Remote data setup Cucumber for API testing & documentation Class 5 [LINK] Class 6 [LINK] Integration frameworks (Cucumber, Webrat, Capybara, and Selenium) Integration testing with Selenium (advantages and problems) Page

Recommends thank_you · 2012-12 · Stack Overflow · on “How to test signup validation in rspec? (rails tutorial chapter 7 exercises)”

You could always expand the tests to where you would test if an user were to insert an username but not a password, check the results, etc. I think that would be overkill though. Other than that, I think you are fine. If you were to change your error messages, then you would have to change the tests. But let's think of how TDD works. You write the test, then you write your code, then refactor if need be. So ideally, you would already know what your validation conditions were. If you wanted to change your code later on, then you would change your tests, then your code. From the Ruby on Rails Guide on Testing: Ideally, you would like to include a test for everything which could possibly break.

Cites bulleric · 2011-12 · Stack Overflow · on “Rspec: How can i test an optional field”

Currently i am learning with the youtube video Efficient Rails Test Driven Development - by Wolfram Arnold [this video] One exercise is: A Person object has an optional middle_name. I create a migration to add the middle name to the database rake g migration AddMiddleNameToPerson middle_name:string and i write a spec it "can have a middle name" But i got no idea how to test this issue how can i test an optional field thanks for help Bulleric