Sha256: 0b6c5827e2f8d9d553b33334b0ec0bb45b61b07bf29349a741ed23873bbcd90b

Contents?: true

Size: 584 Bytes

Versions: 4

Compression:

Stored size: 584 Bytes

Contents

require 'syslog'

describe "Syslog.ident" do
  platform_is_not :windows do

    before :each do
      Syslog.opened?.should be_false
    end

    after :each do
      Syslog.opened?.should be_false
    end

    it "returns the logging identity" do
      Syslog.open("rubyspec")
      Syslog.ident.should == "rubyspec"
      Syslog.close
    end

    it "returns nil if the log is closed" do
      Syslog.opened?.should == false
      Syslog.ident.should == nil
    end

    it "defaults to $0" do
      Syslog.open
      Syslog.ident.should == $0
      Syslog.close
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rubysl-syslog-3.0 spec/ident_spec.rb
rubysl-syslog-2.1.0 spec/ident_spec.rb
rubysl-syslog-1.0.0 spec/ident_spec.rb
rubysl-syslog-2.0.1 spec/ident_spec.rb