Totally agree with this - I'm happy to work with specs that just define a single bit of the system's behaviour (i.e. "unit tests") and specs that define behaviour across several different parts of the system (i.e. "integration tests") - but it drives me mad when they are all mixed in together, rather than in different directory trees.<br>
<br>Incidentally, is there a good naming scheme for this distinction in the BDD world? I'm used to saying "unit tests", "integration tests", "acceptance tests" (though the precise meaning of the last two seems to vary widely between different organisations!) but I'm not sure what to call them in rspec-land. "unit specs"? "stories" in story-runner?<br>
<br>- Korny<br><br><div class="gmail_quote">On Thu, Feb 28, 2008 at 3:01 PM, Maurício Linhares <<a href="mailto:mauricio.linhares@gmail.com">mauricio.linhares@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Tue, Feb 26, 2008 at 2:59 AM, aslak hellesoy<br>
<<a href="mailto:aslak.hellesoy@gmail.com">aslak.hellesoy@gmail.com</a>> wrote:<br>
> > I also had to go into specs on a project I'm not working on, and found<br>
> > an unholy hive of database-accessing specs. It's disheartening.<br>
> > Basically, it's cargo cult development practices - using the "best<br>
> > practice" without actually understanding it.<br>
> ><br>
><br>
> What "best practice" are you referring to?<br>
><br>
<br>
</div>I'm also interested in discovering what is this "best practice".<br>
<br>
I can't see any problem in specs running against a database, that's<br>
exactly what integration testing is about, shouldn't we do integration<br>
testing just because we're using BDD? I really don't think so.<br>
<br>
The big problem about specs running against a database is not knowing<br>
that it's integration testing and also that specs that access<br>
databases run slower than "pure" unit tests, but you can't be sure<br>
that your app works without a bunch of integration tests.<br>
<font color="#888888"><br>
--<br>
Maurício Linhares<br>
<a href="http://alinhavado.wordpress.com/" target="_blank">http://alinhavado.wordpress.com/</a> (pt-br) |<br>
<a href="http://codeshooter.wordpress.com/" target="_blank">http://codeshooter.wordpress.com/</a> (en)<br>
João Pessoa, PB, +55 83 8867-7208<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
rspec-users mailing list<br>
<a href="mailto:rspec-users@rubyforge.org">rspec-users@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/rspec-users" target="_blank">http://rubyforge.org/mailman/listinfo/rspec-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Kornelis Sietsma korny at my surname dot com<br>kornys at gmail dot com on google chat -- kornys on skype<br>"we do what we must, because we can"