Sha256: 2747f4af0f310eb2e7cd26fed303e5269ef3cc1055453ffa7ad27c8a1421c938
Contents?: true
Size: 648 Bytes
Versions: 4
Compression:
Stored size: 648 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe "Kernel#dependency" do before do File.stub!(:directory?).with(Merb.root / "gems").and_return(true) Gem.stub!(:use_paths) Gem.stub!(:clear_paths) end it "loads in files from the local gem-cache first" do Gem.should_receive(:activate).with("json_pure", true).and_return(true) Kernel.dependency "json_pure" end it "does a require if it can't find it in either gem cache" do Gem.stub!(:activate).twice.with("RedCloth", true).and_raise(LoadError) Kernel.should_receive(:require).with("RedCloth") Kernel.dependency "RedCloth" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
merb-0.5.0 | spec/merb/dependency_spec.rb |
merb-0.5.1 | spec/merb/dependency_spec.rb |
merb-0.5.3 | spec/merb/dependency_spec.rb |
merb-0.5.2 | spec/merb/dependency_spec.rb |