what's the difference beween testin the rails way, or just using the the browser? I don't like testing, I don't know how, and it will take time for me to learn it if using the browser is the same as testing? then I'm not intrested in testing with the framework if it fails in the browser, it will fail in the test if it fails in the test, it will fail in the browser then what's the difference ? What I care more is not to fail in the browser, because that's what it's for in the first place, to be browsed if you can tall me a reason for testing, I will appreciate, that way I'll have a reason, and learn more happily I am using only development for now, maybe in production is diffrent
on 2007-05-14 10:59
on 2007-05-14 11:33
on 2007-05-14 14:57
Wow, that's a very comprehensive response. I'd just like to add that it took me a while to get into rails testing. I used to do testing for Java in non-Web apps using jUnit, but couldn't get into it in rails, especially when just experimenting to work out some of the details of my app. Now I'm on actually writing my app properly, I'm using rSpec. This feels far more natural than ordinary tests, and it promotes good testing practises. I would recommend trying rSpec for testing with. Here's an example of a few simple specs to test relationships between models, combined with the code which makes these specs pass. See how easy it is? http://pastie.caboo.se/61451 -Nathan
on 2007-05-14 17:49
Thanks for your advices, I really appreciate it, That's what I needed to get myself going
on 2007-05-14 17:59
rSpec is the next level of testing, so to speak, for those of us who have been practicing test driven development (TDD) for some time now. TDD requires such a drastic change in development mind-set that I believe it's very important for people to work on just TDD, get that down and understand the whys and hows, before jumping into the philosophy of behaviour driven design (BDD) of which rSpec is for. Gino, if you have any specific questions about how to test parts of your code, we will be glad to help. Jason
on 2007-05-14 18:05
what book can easily explain how to test ror applications? i just recently got ruby on rails e-commerce by Christian Hellsten, but am still i think id need something a little more basic for understanding. thanks!
on 2007-05-14 18:57
Agile Web Development with Rails ( http://www.amazon.com/Agile-Development-Rails-Prag... ) Jason
on 2007-05-14 20:30
I'm not sure I agree with that. I reckon rSpec is an ideal place for new testers to start. The idea of specifying behaviour is what good tests should do anyway, and rSpec/BDD encourages this. Plus, syntactically, it's a smaller step to go from no tests to rSpec than to go from no tests to Test::Unit or whatever, because rSpec is much more easy to read.
on 2007-05-14 22:20
> Agile Web Development with Rails Note: "Agile" is an industry code-word. Authors picked it to sugar-coat the real meaning: "We will bore you to tears with all sorts of yacking about tests, instead of just writing sexy features." So calling it "Test-infected Web Development" basically didn't fly. ;-) -- Phlip http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
on 2007-05-15 18:11
On May 14, 1:59 am, gino <rails-mailing-l...@andreas-s.net> wrote: > I don't like testing, I don't know how, and it will take time for me to > learn it Shameless plug: many people have viewed my screencast on Test-First Development with Rails and have said that it cleared up months of confusion in only 90 minutes. Only $9 here: http://peepcode.com/products/test-first-development Geoffrey Grosenbach http://peepcode.com