Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Added RSpec test skeleton to gem command #2108

merged 4 commits into from Nov 22, 2012


None yet
2 participants

MafcoCinco commented Sep 24, 2012


Added an option to bundle gem called --test which creates skeleton code for unit testing. Currently the only value --test accepts is rspec but it should be easy to add others if this is a feature that people want. RSpec was a selfish selection as it is the testing framework that I use.

I Included corresponding unit tests (all of which pass) in spec/other/newgem_spec.rb. I also added unit tests for the --bin option which seemed to be missing.


bundle gem my_gem --test=rspec


indirect commented Sep 24, 2012

I'm a bit of two minds about this... I personally would use this, but this level of complication seems better provided by a Bundler plugin than by Bundler itself. Maybe we should pull this in, and then extract the gem command into a plugin as soon as plugins are a going thing.


MafcoCinco commented Sep 24, 2012

That sounds reasonable to me. I've thought that the gem command belongs out on it's own. It seems like having it in Bundler is breaking the rule of "one object/gem/class/etc., one job".

In my opinion, it is the best skeleton generator but there are some enhancements, like this one, that I would like to see it have. Having it as a plugin might allow it to evolve a bit more quickly as check-ins would not be directly to Bundler core functionality.

Is there an ETA on plugins? Also, is there a dev build? I assume plugin functionality is under active development and I would be happy to help out with moving the gem command if there is a dev branch of the repo that supports plugins.


indirect commented Sep 24, 2012

I don't have a dev build yet -- I haven't had too much time to work on it yet, so it's still in the planning stages. I wrote a blog post about my ideas for plugins if you'd like to check it out and give some feedback before I actually get going on the coding. Thanks!


indirect commented Nov 22, 2012

To help motivate me to get plugins up and working...

@indirect indirect added a commit that referenced this pull request Nov 22, 2012

@indirect indirect Merge pull request #2108 from MafcoCinco/master
Added RSpec test skeleton to gem command

@indirect indirect merged commit 8f634b3 into bundler:master Nov 22, 2012

@kcurtin kcurtin referenced this pull request Nov 23, 2012


add minitest skeleton #2179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment