Sha256: 7e886ec87140121ff77422fbf58dc9542016c4637ac3aabb3116fb14acc4e1bc
Contents?: true
Size: 1.24 KB
Versions: 6
Compression:
Stored size: 1.24 KB
Contents
require 'ramaze' require __DIR__("../test_helper.rb") require TESTS_DIR/"../config.rb" require TESTS_DIR/"../util/gem_manager.rb" def data_dir_of(name, version) File.expand_path("#{name}-#{version}", TESTS_DIR/"tmp/data/") end describe GemManager do it "should install a gem via file" do result, name, version = GemManager.install_file(hello_gem_path("0.3.2")) result.should be_instance_of(String) name.should == "hello-ruby-station" version.should == "0.3.2" GemManager.installed?("hello-ruby-station", "0.3.2").should be_true File.exist?(data_dir_of("hello-ruby-station", "0.3.2")).should be_true end it "should install a gem via network" do result, name, version = GemManager.install_gem("hello-ruby-station") result.should be_instance_of(String) name.should == "hello-ruby-station" version.should == "0.3.0" GemManager.installed?("hello-ruby-station", "0.3.0").should be_true File.exist?(data_dir_of("hello-ruby-station", "0.3.2")).should be_true end it "should uninstall a gem" do GemManager.uninstall("hello-ruby-station", "0.3.2") GemManager.installed?("hello-ruby-station", "0.3.2").should be_false File.exist?(data_dir_of("hello-ruby-station", "0.3.2")).should be_false end end
Version data entries
6 entries across 6 versions & 1 rubygems