Sha256: e3a0b9e8d628e9e18f02839809ed2e983f727aa9c7edd6d3193030d8eca053c5

Contents?: true

Size: 494 Bytes

Versions: 12

Compression:

Stored size: 494 Bytes

Contents

require_relative "spec_helper"
require "upm/core_ext"

describe File do

  it "whiches" do
    File.which("ls").should == "/usr/bin/ls"
    File.which("ls", "rm").should == ["/usr/bin/ls", "/usr/bin/rm"]
    File.which("zzzzzzzzzzzzzzzzzzzzzzzzzzzz").should == nil
  end

  it "which_is_best?s" do
    File.which_is_best?("ls", "rm", "sudo").should == "/usr/bin/ls"
    File.which_is_best?("sudo").should == "/usr/bin/sudo"
    File.which_is_best?("zzzzzzzzzzzzzzzzzz").should == nil
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
upm-0.1.18 spec/core_ext_spec.rb
upm-0.1.17 spec/core_ext_spec.rb
upm-0.1.16 spec/core_ext_spec.rb
upm-0.1.15 spec/core_ext_spec.rb
upm-0.1.14 spec/core_ext_spec.rb
upm-0.1.13 spec/core_ext_spec.rb
upm-0.1.12 spec/core_ext_spec.rb
upm-0.1.11 spec/core_ext_spec.rb
upm-0.1.10 spec/core_ext_spec.rb
upm-0.1.9 spec/core_ext_spec.rb
upm-0.1.8 spec/core_ext_spec.rb
upm-0.1.7 spec/core_ext_spec.rb