Sha256: 6b1314db8d9f3b3b93ba056460032ba12d5d2ae760337e95315408b6995f0524

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

# to test in 1.8.x, make sure to use ruby specname.rb
require File.dirname(__FILE__) + "/../lib/faster_rubygems"
require 'sane'
require 'spec/autorun'
require 'fileutils'

describe Gem do

  before do
    ENV['GEM_PATH'] = 'test_dir'
    @gem_path = 'test_dir/gems/' # wow.
    FileUtils.rm_rf @gem_path
    FileUtils.mkdir_p @gem_path
  end

  context "speeding Gem.bin_path the fake sick way" do

    it "should fake guess the right path instead of loading full rubygems for now" do
      assert Gem.bin_path('after', 'after', ">= 0") =~ /after.*bin.*after/
      # should not have loaded full gems...
      # if this line fails then make sure you are running the spec file like ruby xxx not spec xxx
      assert !defined?(Gem::Dependency)
    end

  end

  context "gem xxx" do
    it "should allow you to load 'older' gem versions somehow, like maybe cacheing" # lower prio
  end
  
  it "in 1.9 if you pass it --disable-gems, it should load its full gem_prelude right there...I guess...though that's not going to fix any bottlenecks though..."

  it "should make a directory cacheing list (yes!) in the root of each gem and load that, and use that to activate. Oh baby. Maybe, though that might fall
  more under the faster_require aspect of it...hmm...maybe it's fast enough for now, except rails, which needs faster_require no matter what anyway..."
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
faster_rubygems-0.5.5 spec/spec.faster_rubygems.rb