Sha256: 8897f45bb982086ff24e4a8615a60de8922a803a28d551d16cc09053be4c5052

Contents?: true

Size: 703 Bytes

Versions: 1

Compression:

Stored size: 703 Bytes

Contents

require File.join(File.dirname(__FILE__),"spec_helper.rb")

describe Launchy::Browser do
    it "should find a path to a executable" do
        File.executable?(Launchy::Browser.new.browser).should == true
    end
    
    it "should handle an http url" do
        Launchy::Browser.handle?("http://www.example.com") == true
    end
    
    it "should handle an https url" do
        Launchy::Browser.handle?("https://www.example.com") == true
    end
    
    it "should handle an ftp url" do
        Launchy::Browser.handle?("ftp://download.example.com") == true
    end
    
    it "should not handle a mailto url" do
        Launchy::Browser.handle?("mailto:jeremy@example.com") == false
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
launchy-0.3.0 spec/browser_spec.rb