Sha256: 133be2a37548a14463c609275164329177c5ced7a89f9562230fc2278c78a23b

Contents?: true

Size: 541 Bytes

Versions: 9

Compression:

Stored size: 541 Bytes

Contents

require 'helper'

class TestRootPath < FunWith::Files::TestCase
  should "add a root to a module" do
    mod = Module.new
    path = File.join("/", "usr", "bin")
    rootify_and_test( mod, path )
  end
  
  should "add a root to an object" do
    obj = Object.new
    path = File.join("/", "usr", "bin")
    rootify_and_test( obj, path )
  end
  
  def rootify_and_test( obj, path )
    RootPath.rootify( obj, path )
    assert obj.respond_to?(:root)
    assert obj.respond_to?(:set_root_path)
    assert_equal path, obj.root.to_s
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fun_with_files-0.0.15 ./test/test_root_path.rb
fun_with_files-0.0.14 ./test/test_root_path.rb
fun_with_files-0.0.13 ./test/test_root_path.rb
fun_with_files-0.0.12 ./test/test_root_path.rb
fun_with_files-0.0.9 ./test/test_root_path.rb
fun_with_files-0.0.8 ./test/test_root_path.rb
fun_with_files-0.0.7 ./test/test_root_path.rb
fun_with_files-0.0.6 ./test/test_root_path.rb
fun_with_files-0.0.5 ./test/test_root_path.rb