0

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).

2 Answers2

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.

tomferon
  • 4,993
  • 1
  • 23
  • 44
  • But if i try to install it without publishing Runic. It tells me it can't find Runic in any of the sources. (but could that be because of my version: 0.1.0.dev.0) – CoderPuppy Oct 22 '12 at 22:43
  • not yet, i'm still developing it (and i don't know how, but i can search) – CoderPuppy Oct 23 '12 at 14:07
  • What about building your gem and installing it locally ? Then your gem will be available and you will be able to use it in the other one. – tomferon Oct 24 '12 at 06:18
  • I built both gems and tried to install them (Runic then Runel) but installing Runel gave me `ERROR: While executing gem ... (Gem::DependencyError) Unable to resolve dependencies: runel requires runic (~> 0.1)` – CoderPuppy Oct 25 '12 at 11:50
0

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.