spec/spec_helpers.rb in buildr4osgi-0.9.2 vs spec/spec_helpers.rb in buildr4osgi-0.9.3

- old
+ new

@@ -49,17 +49,29 @@ module Buildr4OSGi::SpecHelpers OSGi_REPOS = File.expand_path File.join(File.dirname(__FILE__), "..", "tmp", "osgi") + module MockInstanceWriter + def registry=(i) + @registry=i + end + end + class << self def included(config) + config.before(:all) { + OSGi.extend MockInstanceWriter + } + config.before(:each) { remoteRepositoryForHelpers() + OSGi.registry = OSGi::Registry.new } config.after(:all) { FileUtils.rm_rf Buildr4OSGi::SpecHelpers::OSGi_REPOS + } end end def createRepository(name)