Skip to content

Commit

Permalink
Darwin resets the mask of syslog if the log is reopened.
Browse files Browse the repository at this point in the history
  • Loading branch information
nurse committed May 14, 2012
1 parent 961bc49 commit e633752
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions library/syslog/mask_spec.rb
Expand Up @@ -37,17 +37,35 @@
Syslog.mask.should == nil
end

it "persists if the log is reopened" do
Syslog.open
Syslog.mask.should == 255
Syslog.mask = 64
platform_is :darwin do
it "resets if the log is reopened" do
Syslog.open
Syslog.mask.should == 255
Syslog.mask = 64

Syslog.reopen("rubyspec") do
Syslog.mask.should == 64
Syslog.reopen("rubyspec") do
Syslog.mask.should == 64
end

Syslog.open do
Syslog.mask.should == 64
end
end
end

Syslog.open do
Syslog.mask.should == 64
platform_is_not :darwin do
it "persists if the log is reopened" do
Syslog.open
Syslog.mask.should == 255
Syslog.mask = 64

Syslog.reopen("rubyspec") do
Syslog.mask.should == 64
end

Syslog.open do
Syslog.mask.should == 64
end
end
end
end
Expand Down

0 comments on commit e633752

Please sign in to comment.