Sha256: fe5a844f7ac40730fc5caccf4841f08a99c3e3ebc3b570094ff2c579676acfe2

Contents?: true

Size: 1.17 KB

Versions: 96

Compression:

Stored size: 1.17 KB

Contents

require 'rdoc/test_case'

class TestRDocRIPaths < RDoc::TestCase

  def setup
    super

    RDoc::RI::Paths.instance_variable_set :@gemdirs, %w[/nonexistent/gemdir]
  end

  def teardown
    super

    RDoc::RI::Paths.instance_variable_set :@gemdirs, nil
  end

  def test_class_path_nonexistent
    temp_dir do |dir|
      nonexistent = File.join dir, 'nonexistent'
      path = RDoc::RI::Paths.path true, true, true, true, nonexistent

      refute_includes path, nonexistent
    end
  end

  def test_class_raw_path
    path = RDoc::RI::Paths.raw_path true, true, true, true

    assert_equal RDoc::RI::Paths::SYSDIR,  path.shift
    assert_equal RDoc::RI::Paths::SITEDIR, path.shift
    assert_equal RDoc::RI::Paths::HOMEDIR, path.shift
    assert_equal '/nonexistent/gemdir',    path.shift
  end

  def test_class_raw_path_extra_dirs
    path = RDoc::RI::Paths.raw_path true, true, true, true, '/nonexistent'

    assert_equal '/nonexistent',           path.shift
    assert_equal RDoc::RI::Paths::SYSDIR,  path.shift
    assert_equal RDoc::RI::Paths::SITEDIR, path.shift
    assert_equal RDoc::RI::Paths::HOMEDIR, path.shift
    assert_equal '/nonexistent/gemdir',    path.shift
  end

end

Version data entries

96 entries across 76 versions & 22 rubygems

Version Path
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/test/test_rdoc_ri_paths.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
swipe-rails-0.0.5 vendor/bundle/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/test/test_rdoc_ri_paths.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/test/test_rdoc_ri_paths.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/test/test_rdoc_ri_paths.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.1/test/test_rdoc_ri_paths.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
font-awesome-rails-3.1.1.2 vendor/ruby/2.0.0/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
font-awesome-rails-3.1.1.1 vendor/ruby/2.0.0/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
challah-1.0.0.beta3 vendor/bundle/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
challah-1.0.0.beta2 vendor/bundle/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
challah-1.0.0.beta vendor/bundle/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
challah-1.0.0.beta vendor/bundle/gems/rdoc-3.12/test/test_rdoc_ri_paths.rb
fc-webicons-0.0.3 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
fc-webicons-0.0.2 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
fc-webicons-0.0.1 vendor/bundle/ruby/1.9.1/gems/rdoc-3.12.2/test/test_rdoc_ri_paths.rb
rdoc-3.12.2 test/test_rdoc_ri_paths.rb