Sha256: 346b8c06c9b6ffdeee44da6bb8463db6c02da38a95788dfeb6b520daf8bf0d8b

Contents?: true

Size: 634 Bytes

Versions: 1

Compression:

Stored size: 634 Bytes

Contents

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

describe Launchy do
    it "instantiates an insteadn of Launchy::CommandLine for commandline" do
        Launchy.command_line.class.should == Launchy::CommandLine
    end
    
    it "logs to stderr when LAUNCHY_DEBUG environment variable is set" do
        ENV["LAUNCHY_DEBUG"] = 'true'
        old_stderr = $stderr
        $stderr = StringIO.new
        Launchy.log "This is a test log message"
        $stderr.string.strip.should == "LAUNCHY_DEBUG: This is a test log message"
        $stderr = old_stderr
        ENV["LAUNCHY_DEBUG"] = nil
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
launchy-0.3.1 spec/launchy_spec.rb