Developing gems and testing

后端 未结 4 2002
野的像风
野的像风 2021-01-31 17:45

I am new to developing Ruby gems, but I thought I\'d give it a try.

Recently checking out the latest episode on Railscasts (http://railscasts.com/episodes/245-new-gem-wi

4条回答
  •  清歌不尽
    2021-01-31 18:23

    I can't recommend this guide from Ryan Bigg enough: http://bundler.io/v1.16/guides/creating_gem.html. It walks you through generating a gem using Bundler and setting up automated testing. You can develop your features without ever actually having to run your code manually. It's a workflow I'm using for my own gem development and has worked very well so far.

    UPDATE: Rereading your question, it sounds like your gem is a Rails engine. I'd recommending looking at José Valim's EngineX. It's a generator that creates a gem with a dummy Rails app for testing (https://github.com/josevalim/enginex). If you already have a lot of code, http://keithschacht.com/creating-a-rails-3-engine-plugin-gem/ might help you setup a dummy app for testing.

提交回复
热议问题