spec/dependent_spec.rb in gem-dependent-0.1.4 vs spec/dependent_spec.rb in gem-dependent-0.1.5

- old
+ new

@@ -1,7 +1,8 @@ -$LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__)) -require 'lib/rubygems/dependent' # normal require does not work once gem is installed, wtf... +# normal require does not work once gem is installed, because its loaded via rubygems +$LOAD_PATH.unshift File.expand_path('..', File.dirname(__FILE__)) +require 'lib/rubygems/dependent' describe Gem::Dependent do before do Gem::SpecFetcher.fetcher = nil # reset cache end @@ -48,9 +49,15 @@ source = 'http://rubygems.org' stub_source(source) Gem::Dependent.find('hoe', :source => source) end + it "obeys parallel option" do + stub_source + Parallel.should_receive(:map).with(anything, :in_processes => 3).and_return [] + Gem::Dependent.find('hoe', :parallel => 3) + end + it "has a VERSION" do Gem::Dependent::VERSION.should =~ /^\d+\.\d+\.\d+$/ end -end \ No newline at end of file +end