Hello everyone I had a few questions I just downloaded rcov and have
it up my question is are there any good sites that teach you how to
write TDD in rails.
or any books that can teach me the fundamentals of TDD in rails
You can try out BDD since TDD is old concept now. Rspec helps the developers lot.
BDD is "consultant-friendly".
BDD can be used as a TDD platform. Either way, we are talking about driving development with executable specifications.
Also, technically, whenever at work we try to do something simple in RSpec, such as set a session variable before activating the target method, we invariably get fragile code. The hooks that Rails adds to Test::Unit::TestCase seem more stable, and our RSpec experiments have decayed over time...
Hello everyone I had a few questions I just downloaded rcov and have
it up my question is are there any good sites that teach you how to
write TDD in rails.
or any books that can teach me the fundamentals of TDD in rails
Rails is all about the TDD - getting a test (or a "spec") to fail first, then writing code to pass the test, then refactoring.
The most important aspect of this is a TDD-friendly editor. You need to _minimize_ the time between changing code and getting test results. That lets you test one edit at a time, which is best.
(And under Ruby you often only _need_ one edit to achieve a testable change, unlike some other languages.)
Don't hold your breath waiting for such an editor...
Read the /Agile Web Development with Rails/ book, by the Daves. It covers TDD as part of the lifecycle (hence the title "Agile") - not as an afterthought.
rails.vim might be what you are looking for: http://rails.vim.tpope.net/
there are some great shortcuts for quickly switching between a file
and its test file