Rails itself is tested in Minitest. I found recently that when I wanted to write a Gem that interacted with parts of Rails, Minitest was easier because I could go off the Rails minitest examples.
Most large production apps I’ve worked on are tested in Rspec, which is by far the popular choice. I do find that over-use of “declarative-style” testing to be difficult to read. (I.e., when so many things are defined with “let” statements that you have to reverse engineer 6 methods just to figure out what calls what). Having said that, some people really like the declarative style of Rspec. -Jason > On Nov 21, 2014, at 6:14 AM, Matt Jones <[email protected]> wrote: > > > > On Thursday, 20 November 2014 14:13:55 UTC-5, Roelof Wobben wrote: > Hello, > > I try again to learn ruby and Im following now "Agile Web development in > Rails 4" > > I see that the author uses minitest to test models. > > Is there any reason to use minitest instead of Rspec to test models and > controllers. > > > Both tools will do the job, but my guess is that minitest was selected for > this because it is simpler to explain to new developers. In other words, the > expressive DSL that makes rspec nice to use after you know what's going on > can also be confusing to people who've never encountered it before. > > --Matt Jones > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/6bb57d78-1722-42eb-a32d-1fec09fc5489%40googlegroups.com > > <https://groups.google.com/d/msgid/rubyonrails-talk/6bb57d78-1722-42eb-a32d-1fec09fc5489%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. ---- Jason Fleetwood-Boldt [email protected] http://www.jasonfleetwoodboldt.com/writing All material © Jason Fleetwood-Boldt 2014. Public conversations may be turned into blog posts (original poster information will be made anonymous). Email [email protected] with questions/concerns about this. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CCEEAD3B-9039-43DA-964E-F0BA5ACEA0AE%40datatravels.com. For more options, visit https://groups.google.com/d/optout.

