How do you develop multiple gems?

筅森魡賤 提交于 2019-12-13 03:18:25

问题


I'm developing two gem: Runel and Runic. Runel depends on Runic. But then how do I get Runic to load up to run Runel tests (and bundle install).

I need Runic in the Runel tests because some of Runel's classes extend from Runic's classes. And I want to test it (try it out) as the whole thing (Runel is a VM, Runic is the base for it).


回答1:


If Runel depends on Runic, then the tests of Runic should use Runel. That is, Runic provides a service and this service should be tested as an independent thing.

In the same way, your unit tests in Runel shouldn't use Runic. This affirmation is not true for integration tests.

If you consider this does not make sense, then maybe your two gems should actually form one.




回答2:


It was just that they were prerelease versions (0.0.1.dev.1).

But bundle install still gives Fetching source index for http://rubygems.org/ Could not find gem 'runic (~> 0.0) x86-mingw32', which is required by gem 'runel (>= 0) x86-mingw32', in any of the sources.



来源:https://stackoverflow.com/questions/13020669/how-do-you-develop-multiple-gems

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!