Some jarring issues with testing in the Rails community, and these aren't things I recognized until about 3 years into it all (in other words, recently) and finally had the wherewithal and exposure to other tools/paradigms where I could finally criticize my tools.<p>* Testing is an advanced topic, yet it seems to be misleadingly sold in Rails tutorial literature as something that everyone else effortlessly does with the same ease of "gem install hairball".[3]<p>* Good luck finding resources on Test::Unit/Minitest.[1]<p>* Where the documentation?<p>* Rails invents its own definitions for "unit tests", "functional tests", and "integration tests". Even though they already exist in testing vernacular. [2] Unfortunately confusing when Rails is your first experience with testing and you think "unit test" means "model test" and "integration test" means fumbling fruitlessly with your jasmine/capybara frankensuite because you're lost like I was and tried to stitch together a few Railscasts because you just don't know any better.<p>* Instead of embracing tests that don't depend on the Rails stack, the Rails community embraces tools like Spork that keep a Rails process alive. Because Rails takes too long to boot to have a test-driven cycle with tests that depend on Rails. The concept of service objects and wrapping Rails/3rd party libs is brand new to me and I only encountered it after I was good enough to contribute to large Rails apps and read their source code.<p>[1]: At least Ruby 1.9 changed the name (in essence) to "minitest" which we can finally google. "test unit"? Not so easy to google.<p>Also, here's the best resource for Minitest I can find: <a href="http://www.mattsears.com/articles/2011/12/10/minitest-quick-reference" rel="nofollow">http://www.mattsears.com/articles/2011/12/10/minitest-quick-...</a>. It's a cheatsheet on someone's blog.<p>Frankly, there are much better arguments for sticking with Rspec. For one, it's the testing library that the community uses and you need community support. The popular gems you'll be using probably have more wiki info on Rspec testing too (like Devise). Rspec is documented and even illustrates best practices. <a href="http://betterspecs.org/" rel="nofollow">http://betterspecs.org/</a>.<p>That Minitest is built in to Ruby was never a convincing reason to use it. I already have development dependencies. Trust me that testing isn't going to be the thing that introduces the first 3rd party dependency into my app. Fucking "awesome_print" is already in my Gemfile, so it's not a big deal to add a gem that makes testing better for me.<p>And for all the hate that Rspec gets for its DSL, Test::Unit/Minitest's DSL (assertion statements) is just as bad and Minitest::Spec introduces an Rspec DSL anyways.<p>The only way I want to write tests is by writing my assertions in pure Ruby without having to lug around a bunch of different assertion variants just so the testing library knows what kind of error output to show me.<p>The ONLY solution I've found is a library called Wrong (<a href="https://github.com/sconover/wrong" rel="nofollow">https://github.com/sconover/wrong</a>) and it works with both Minitest and Rspec.<p>It lets you write assertions like this:<p><pre><code> include Wrong
assert { "abc" == "abd" }
assert { cookie_jar.empty? }
assert { dog.respond_to?(:walk) }
assert { boy.is_a? Human }
</code></pre>
Like, actual Ruby. And it will figure out on its own how to display diffs in error output.<p>Meanwhile, here's Minitest:<p><pre><code> assert_equal "abc", "abd"
assert_empty cookie_jar
assert_responds_to dog, :walk
assert_instance_of Human, boy
# I know these because I'm looking at a cheatsheet
</code></pre>
Here's Rspec:<p><pre><code> "abc".should == "abd"
cookie_jar.should be_empty
it ->(dog){responds_2}.(:walk).(&:does?)
</code></pre>
So all this talk about avoiding DSLs yet you don't. And it wasn't until blowmage (of minitest) told me about Wrong in IRC that I found what I wanted -- the only real way to avoid DSLs and verbosity in Ruby testing that I've come across.<p>[2]: Xavier Shay brings this up in his talk <a href="http://www.confreaks.com/videos/815-larubyconf2012-rails-sustainable-productivity" rel="nofollow">http://www.confreaks.com/videos/815-larubyconf2012-rails-sus...</a><p>[3]: Oh yeah, and after three years of Ruby and Rails, it wasn't until I was exposed to functional programming (Martin Odersky, Rich Hickey), OO design (Sandi Metz), and testing screencasts (Gary Bernhardt) that I finally understood how to even fundamentally write code that could be tested. In other words, it took high level a-ha moments for me to be able to write tests that didn't just cripple my workflow and waste my time and slow down my learning process. That's where I found out that testing is an advanced topic, not a bullet point you can throw into a newbie tutorial on how to generate a Rails scaffold.