bundler/bundler — pull request #3207 by sferik (2014-10-08 13:55:00+00:00)
Title: Don't package test files with gem

I just shipped a new version of the [`rails_admin` gem](http://rubygems.org/gems/rails_admin) and it took longer to push than I expected. Upon investigating, I realized that was because the gem had grown to 8.2 MB. Digging in deeper, I was astonished to [realize](https://twitter.com/sferik/status/519836262631739393) that all but 229 KB were tests! This means that hundreds of thousands of people were downloading a file 36 times bigger than necessary to get tests they would almost certainly never run.

This may be an extreme example, since RailsAdmin embeds a full Rails app in the spec directory in order to mount itself as a Rails engine. That said, this problem affects almost every gem, albeit to a lesser extent, and I can’t think of a good reason why any gem should package its tests.

Back in the day, there was a service called [Gem Testers](https://blog.engineyard.com/2011/introducing-gem-testers) (originally at gem-testers.org and eventually at test.rubygems.org) and a corresponding [`rubygems-test` gem](http://rubygems.org/gems/rubygems-test) that automatically ran the test suite of a every gem on install, however, this service never gained traction and is now offline.

If someone wants to run the tests for a particular gem, they can easily find the source code at the project’s homepage. Ninety-nine percent of the time, when someone installs a gem it’s because they want to execute the code, not the tests. I believe changing this default will greatly improve the health of the RubyGems ecosystem and the Ruby community as a whole.