Sha256: 99689025fb91261ea9ccf81b1125d584eb7084f350d1a195ab62d92c4a865db9

Contents?: true

Size: 795 Bytes

Versions: 5

Compression:

Stored size: 795 Bytes

Contents

$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__))
require 'test_helper'

context 'Installing from a directory' do
  setup_with_fs do
    @source = fresh_local_dir('simple_d-1.2.3').source
  end

  test "installs the lib files" do
    Rip::Commands.install({}, @source)

    libpath = Rip.dir + '/active/lib/simple_d.rb'
    assert File.exists?(libpath), 'simple_d.rb should be installed'
  end

  test "finds version from name suffix" do
    assert_equal '1.2', fresh_local_dir('simple_d-1.2').version
    assert_equal '1.2.3', fresh_local_dir('simple_d-1.2.3').version
    assert_equal '1.2.3.4', fresh_local_dir('simple_d-1.2.3.4').version
  end

  test "defaults to unversioned if not named properly" do
    assert_equal 'unversioned', fresh_local_dir('simple_d').version
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rip-0.0.4 test/dir_test.rb
rip-0.0.5 test/dir_test.rb
rip-0.0.3 test/dir_test.rb
rip-0.0.2 test/dir_test.rb
rip-0.0.1 test/dir_test.rb