diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:18:52 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:18:52 +0000 |
commit | 1d15d5f08032acf1b7bceacbb450d617ff6e0931 (patch) | |
tree | a3785a79899302bc149e4a6e72f624ac27dc1f10 /spec/rubyspec/library/syslog | |
parent | 75bfc6440d595bf339007f4fb280fd4d743e89c1 (diff) |
Move spec/rubyspec to spec/ruby for consistency
* Other ruby implementations use the spec/ruby directory.
[Misc #13792] [ruby-core:82287]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/rubyspec/library/syslog')
22 files changed, 0 insertions, 733 deletions
diff --git a/spec/rubyspec/library/syslog/alert_spec.rb b/spec/rubyspec/library/syslog/alert_spec.rb deleted file mode 100644 index 4653fa8636..0000000000 --- a/spec/rubyspec/library/syslog/alert_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/log', __FILE__) - require 'syslog' - - describe "Syslog.alert" do - it_behaves_like :syslog_log, :alert - end -end diff --git a/spec/rubyspec/library/syslog/close_spec.rb b/spec/rubyspec/library/syslog/close_spec.rb deleted file mode 100644 index f7bc4ac6e9..0000000000 --- a/spec/rubyspec/library/syslog/close_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require 'syslog' - - describe "Syslog.close" 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 "closes the log" do - Syslog.opened?.should be_false - Syslog.open - Syslog.opened?.should be_true - Syslog.close - Syslog.opened?.should be_false - end - - it "raises a RuntimeError if the log's already closed" do - lambda { Syslog.close }.should raise_error(RuntimeError) - end - - it "it does not work inside blocks" do - lambda { - Syslog.open { |s| s.close } - }.should raise_error(RuntimeError) - Syslog.opened?.should == false - end - - it "sets the identity to nil" do - Syslog.open("rubyspec") - Syslog.ident.should == "rubyspec" - Syslog.close - Syslog.ident.should be_nil - end - - it "sets the options to nil" do - Syslog.open("rubyspec", Syslog::LOG_PID) - Syslog.options.should == Syslog::LOG_PID - Syslog.close - Syslog.options.should == nil - end - - it "sets the facility to nil" do - Syslog.open - Syslog.facility.should == 8 - Syslog.close - Syslog.facility.should == nil - end - end - end -end diff --git a/spec/rubyspec/library/syslog/constants_spec.rb b/spec/rubyspec/library/syslog/constants_spec.rb deleted file mode 100644 index c335ff46e6..0000000000 --- a/spec/rubyspec/library/syslog/constants_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require 'syslog' - - describe "Syslog::Constants" do - platform_is_not :windows, :solaris, :aix do - before :all do - @constants = %w(LOG_AUTHPRIV LOG_USER LOG_LOCAL2 LOG_NOTICE LOG_NDELAY - LOG_SYSLOG LOG_ALERT LOG_FTP LOG_LOCAL5 LOG_ERR LOG_AUTH - LOG_LOCAL1 LOG_ODELAY LOG_NEWS LOG_DAEMON LOG_LOCAL4 - LOG_CRIT LOG_INFO LOG_PERROR LOG_LOCAL0 LOG_CONS LOG_LPR - LOG_LOCAL7 LOG_WARNING LOG_CRON LOG_LOCAL3 LOG_EMERG - LOG_NOWAIT LOG_UUCP LOG_PID LOG_KERN LOG_MAIL LOG_LOCAL6 - LOG_DEBUG) - end - - it "includes the Syslog constants" do - @constants.each do |c| - Syslog::Constants.should have_constant(c) - end - end - end - - # The masks are defined in <syslog.h> - - describe "Syslog::Constants.LOG_MASK" do - it "returns the mask value for a priority" do - Syslog::Constants.LOG_MASK(Syslog::LOG_DEBUG).should == 128 - Syslog::Constants.LOG_MASK(Syslog::LOG_WARNING).should == 16 - end - end - - describe "Syslog::Constants.LOG_UPTO" do - it "returns a mask for the priorities up to a given argument" do - Syslog::Constants.LOG_UPTO(Syslog::LOG_ALERT).should == 3 - Syslog::Constants.LOG_UPTO(Syslog::LOG_DEBUG).should == 255 - end - end - end -end diff --git a/spec/rubyspec/library/syslog/crit_spec.rb b/spec/rubyspec/library/syslog/crit_spec.rb deleted file mode 100644 index 28e3af67cc..0000000000 --- a/spec/rubyspec/library/syslog/crit_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/log', __FILE__) - require 'syslog' - - describe "Syslog.crit" do - it_behaves_like :syslog_log, :crit - end -end diff --git a/spec/rubyspec/library/syslog/debug_spec.rb b/spec/rubyspec/library/syslog/debug_spec.rb deleted file mode 100644 index ff9fc5d97e..0000000000 --- a/spec/rubyspec/library/syslog/debug_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/log', __FILE__) - require 'syslog' - - describe "Syslog.debug" do - it_behaves_like :syslog_log, :debug - end -end diff --git a/spec/rubyspec/library/syslog/emerg_spec.rb b/spec/rubyspec/library/syslog/emerg_spec.rb deleted file mode 100644 index 15cc49be32..0000000000 --- a/spec/rubyspec/library/syslog/emerg_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/log', __FILE__) - require 'syslog' - - describe "Syslog.emerg" do - # Some way needs do be found to prevent this spec - # from causing output on all open terminals. If this - # is not possible, this spec may need a special guard - # that only runs when requested. - quarantine! do - it_behaves_like :syslog_log, :emerg - end - end -end diff --git a/spec/rubyspec/library/syslog/err_spec.rb b/spec/rubyspec/library/syslog/err_spec.rb deleted file mode 100644 index fdadd49e09..0000000000 --- a/spec/rubyspec/library/syslog/err_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/log', __FILE__) - require 'syslog' - - describe "Syslog.err" do - it_behaves_like :syslog_log, :err - end -end diff --git a/spec/rubyspec/library/syslog/facility_spec.rb b/spec/rubyspec/library/syslog/facility_spec.rb deleted file mode 100644 index 02ea754b6b..0000000000 --- a/spec/rubyspec/library/syslog/facility_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require 'syslog' - - describe "Syslog.facility" 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 facility" do - Syslog.open("rubyspec", 3, Syslog::LOG_MAIL) - Syslog.facility.should == Syslog::LOG_MAIL - Syslog.close - end - - it "returns nil if the log is closed" do - Syslog.opened?.should be_false - Syslog.facility.should == nil - end - - it "defaults to LOG_USER" do - Syslog.open - Syslog.facility.should == Syslog::LOG_USER - Syslog.close - end - - it "resets after each open call" do - Syslog.open - Syslog.facility.should == Syslog::LOG_USER - - Syslog.open!("rubyspec", 3, Syslog::LOG_MAIL) - Syslog.facility.should == Syslog::LOG_MAIL - Syslog.close - - Syslog.open - Syslog.facility.should == Syslog::LOG_USER - Syslog.close - end - end - end -end diff --git a/spec/rubyspec/library/syslog/ident_spec.rb b/spec/rubyspec/library/syslog/ident_spec.rb deleted file mode 100644 index a685dfa927..0000000000 --- a/spec/rubyspec/library/syslog/ident_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - 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 -end diff --git a/spec/rubyspec/library/syslog/info_spec.rb b/spec/rubyspec/library/syslog/info_spec.rb deleted file mode 100644 index 88ff81994d..0000000000 --- a/spec/rubyspec/library/syslog/info_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/log', __FILE__) - require 'syslog' - - describe "Syslog.info" do - it_behaves_like :syslog_log, :info - end -end diff --git a/spec/rubyspec/library/syslog/inspect_spec.rb b/spec/rubyspec/library/syslog/inspect_spec.rb deleted file mode 100644 index 5fd7793c22..0000000000 --- a/spec/rubyspec/library/syslog/inspect_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require 'syslog' - - describe "Syslog.inspect" 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 a string a closed log" do - Syslog.inspect.should =~ /opened=false/ - end - - it "returns a string for an opened log" do - Syslog.open - Syslog.inspect.should =~ /opened=true.*/ - Syslog.close - end - - it "includes the ident, options, facility and mask" do - Syslog.open("rubyspec", Syslog::LOG_PID, Syslog::LOG_USER) - inspect_str = Syslog.inspect.split ", " - inspect_str[0].should =~ /opened=true/ - inspect_str[1].should == "ident=\"rubyspec\"" - inspect_str[2].should == "options=#{Syslog::LOG_PID}" - inspect_str[3].should == "facility=#{Syslog::LOG_USER}" - inspect_str[4].should == "mask=255>" - Syslog.close - end - end - end -end diff --git a/spec/rubyspec/library/syslog/instance_spec.rb b/spec/rubyspec/library/syslog/instance_spec.rb deleted file mode 100644 index 60f43dbdea..0000000000 --- a/spec/rubyspec/library/syslog/instance_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require 'syslog' - - describe "Syslog.instance" do - platform_is_not :windows do - it "returns the module" do - Syslog.instance.should == Syslog - end - end - end -end diff --git a/spec/rubyspec/library/syslog/log_spec.rb b/spec/rubyspec/library/syslog/log_spec.rb deleted file mode 100644 index 2403943cfc..0000000000 --- a/spec/rubyspec/library/syslog/log_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require 'syslog' - - describe "Syslog.log" do - platform_is_not :windows, :darwin, :solaris, :aix do - - before :each do - Syslog.opened?.should be_false - end - - after :each do - Syslog.opened?.should be_false - end - - it "receives a priority as first argument" do - lambda { - Syslog.open("rubyspec", Syslog::LOG_PERROR) do |s| - s.log(Syslog::LOG_ALERT, "Hello") - s.log(Syslog::LOG_CRIT, "World") - end - }.should output_to_fd("rubyspec: Hello\nrubyspec: World\n", $stderr) - end - - it "accepts undefined priorites" do - lambda { - Syslog.open("rubyspec", Syslog::LOG_PERROR) do |s| - s.log(1337, "Hello") - end - # use a regex since it'll output unknown facility/priority messages - }.should output_to_fd(/rubyspec: Hello/, $stderr) - end - - it "fails with TypeError on nil log messages" do - Syslog.open do |s| - lambda { s.log(1, nil) }.should raise_error(TypeError) - end - end - - it "fails if the log is closed" do - lambda { - Syslog.log(Syslog::LOG_ALERT, "test") - }.should raise_error(RuntimeError) - end - - it "accepts printf parameters" do - lambda { - Syslog.open("rubyspec", Syslog::LOG_PERROR) do |s| - s.log(Syslog::LOG_ALERT, "%s x %d", "chunky bacon", 2) - end - }.should output_to_fd("rubyspec: chunky bacon x 2\n", $stderr) - end - end - end -end diff --git a/spec/rubyspec/library/syslog/mask_spec.rb b/spec/rubyspec/library/syslog/mask_spec.rb deleted file mode 100644 index 49be56d304..0000000000 --- a/spec/rubyspec/library/syslog/mask_spec.rb +++ /dev/null @@ -1,112 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require 'syslog' - - describe "Syslog.mask" do - platform_is_not :windows do - - before :each do - Syslog.opened?.should be_false - end - - after :each do - Syslog.opened?.should be_false - # make sure we return the mask to the default value - Syslog.open { |s| s.mask = 255 } - end - - it "returns the log priority mask" do - Syslog.open("rubyspec") do - Syslog.mask.should == 255 - Syslog.mask = 3 - Syslog.mask.should == 3 - Syslog.mask = 255 - end - end - - it "defaults to 255" do - Syslog.open do |s| - s.mask.should == 255 - end - end - - it "returns nil if the log is closed" do - Syslog.opened?.should == false - Syslog.mask.should == nil - end - - 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 == 255 - end - - Syslog.open do - Syslog.mask.should == 255 - end - end - end - - 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 - end - - describe "Syslog.mask=" do - platform_is_not :windows do - - before :each do - Syslog.opened?.should be_false - end - - after :each do - Syslog.opened?.should be_false - # make sure we return the mask to the default value - Syslog.open { |s| s.mask = 255 } - end - - it "sets the log priority mask" do - Syslog.open do - Syslog.mask = 64 - Syslog.mask.should == 64 - end - end - - it "raises an error if the log is closed" do - lambda { Syslog.mask = 1337 }.should raise_error(RuntimeError) - end - - it "only accepts numbers" do - Syslog.open do - - Syslog.mask = 1337 - Syslog.mask.should == 1337 - - Syslog.mask = 3.1416 - Syslog.mask.should == 3 - - lambda { Syslog.mask = "oh hai" }.should raise_error(TypeError) - lambda { Syslog.mask = "43" }.should raise_error(TypeError) - - end - end - end - end -end diff --git a/spec/rubyspec/library/syslog/notice_spec.rb b/spec/rubyspec/library/syslog/notice_spec.rb deleted file mode 100644 index 7a27e23729..0000000000 --- a/spec/rubyspec/library/syslog/notice_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/log', __FILE__) - require 'syslog' - - describe "Syslog.notice" do - it_behaves_like :syslog_log, :notice - end -end diff --git a/spec/rubyspec/library/syslog/open_spec.rb b/spec/rubyspec/library/syslog/open_spec.rb deleted file mode 100644 index 18e7f0c80e..0000000000 --- a/spec/rubyspec/library/syslog/open_spec.rb +++ /dev/null @@ -1,86 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/reopen', __FILE__) - require 'syslog' - - describe "Syslog.open" 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 module" do - Syslog.open.should == Syslog - Syslog.close - Syslog.open("Test", 5, 9).should == Syslog - Syslog.close - end - - it "receives an identity as first argument" do - Syslog.open("rubyspec") - Syslog.ident.should == "rubyspec" - Syslog.close - end - - it "defaults the identity to $0" do - Syslog.open - Syslog.ident.should == $0 - Syslog.close - end - - it "receives the logging options as second argument" do - Syslog.open("rubyspec", Syslog::LOG_PID) - Syslog.options.should == Syslog::LOG_PID - Syslog.close - end - - it "defaults the logging options to LOG_PID | LOG_CONS" do - Syslog.open - Syslog.options.should == Syslog::LOG_PID | Syslog::LOG_CONS - Syslog.close - end - - it "receives a facility as third argument" do - Syslog.open("rubyspec", Syslog::LOG_PID, 0) - Syslog.facility.should == 0 - Syslog.close - end - - it "defaults the facility to LOG_USER" do - Syslog.open - Syslog.facility.should == Syslog::LOG_USER - Syslog.close - end - - it "receives a block and calls it with the module" do - Syslog.open("rubyspec", 3, 8) do |s| - s.should == Syslog - s.ident.should == "rubyspec" - s.options.should == 3 - s.facility.should == Syslog::LOG_USER - end - end - - it "closes the log if after it receives a block" do - Syslog.open{ } - Syslog.opened?.should be_false - end - - it "raises an error if the log is opened" do - Syslog.open - lambda { Syslog.open}.should raise_error - lambda { Syslog.close; Syslog.open }.should_not raise_error - Syslog.close - end - end - end - - describe "Syslog.open!" do - it_behaves_like :syslog_reopen, :open! - end -end diff --git a/spec/rubyspec/library/syslog/opened_spec.rb b/spec/rubyspec/library/syslog/opened_spec.rb deleted file mode 100644 index 82b8ba45f7..0000000000 --- a/spec/rubyspec/library/syslog/opened_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require 'syslog' - - describe "Syslog.opened?" 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 true if the log is opened" do - Syslog.open - Syslog.opened?.should be_true - Syslog.close - end - - it "returns false otherwise" do - Syslog.opened?.should be_false - Syslog.open - Syslog.close - Syslog.opened?.should be_false - end - - it "works inside a block" do - Syslog.open do |s| - s.opened?.should be_true - Syslog.opened?.should be_true - end - Syslog.opened?.should be_false - end - end - end -end diff --git a/spec/rubyspec/library/syslog/options_spec.rb b/spec/rubyspec/library/syslog/options_spec.rb deleted file mode 100644 index 4a3914531a..0000000000 --- a/spec/rubyspec/library/syslog/options_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require 'syslog' - - describe "Syslog.options" 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 options" do - Syslog.open("rubyspec", Syslog::LOG_PID) - Syslog.options.should == Syslog::LOG_PID - Syslog.close - end - - it "returns nil when the log is closed" do - Syslog.opened?.should be_false - Syslog.options.should == nil - end - - it "defaults to LOG_PID | LOG_CONS" do - Syslog.open - Syslog.options.should == Syslog::LOG_PID | Syslog::LOG_CONS - Syslog.close - end - - it "resets after each open call" do - Syslog.open - Syslog.options.should == Syslog::LOG_PID | Syslog::LOG_CONS - - Syslog.open!("rubyspec", Syslog::LOG_PID) - Syslog.options.should == Syslog::LOG_PID - Syslog.close - - Syslog.open - Syslog.options.should == Syslog::LOG_PID | Syslog::LOG_CONS - Syslog.close - end - end - end -end diff --git a/spec/rubyspec/library/syslog/reopen_spec.rb b/spec/rubyspec/library/syslog/reopen_spec.rb deleted file mode 100644 index de1ce2c255..0000000000 --- a/spec/rubyspec/library/syslog/reopen_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/reopen', __FILE__) - require 'syslog' - - describe "Syslog.reopen" do - it_behaves_like :syslog_reopen, :reopen - end -end diff --git a/spec/rubyspec/library/syslog/shared/log.rb b/spec/rubyspec/library/syslog/shared/log.rb deleted file mode 100644 index 6d0d3a3c23..0000000000 --- a/spec/rubyspec/library/syslog/shared/log.rb +++ /dev/null @@ -1,40 +0,0 @@ -describe :syslog_log, shared: true do - platform_is_not :windows, :darwin, :solaris, :aix do - before :each do - Syslog.opened?.should be_false - end - - after :each do - Syslog.opened?.should be_false - end - - it "logs a message" do - lambda { - Syslog.open("rubyspec", Syslog::LOG_PERROR) do - Syslog.send(@method, "Hello") - end - }.should output_to_fd("rubyspec: Hello\n", $stderr) - end - - it "accepts sprintf arguments" do - lambda { - Syslog.open("rubyspec", Syslog::LOG_PERROR) do - Syslog.send(@method, "Hello %s", "world") - Syslog.send(@method, "%d dogs", 2) - end - }.should output_to_fd("rubyspec: Hello world\nrubyspec: 2 dogs\n", $stderr) - end - - it "works as an alias for Syslog.log" do - level = Syslog.const_get "LOG_#{@method.to_s.upcase}" - response = "rubyspec: Hello\n" - lambda { - Syslog.open("rubyspec", Syslog::LOG_PERROR) do - Syslog.send(@method, "Hello") - Syslog.log(level, "Hello") - end - # make sure the same thing is written to $stderr. - }.should output_to_fd(response * 2, $stderr) - end - end -end diff --git a/spec/rubyspec/library/syslog/shared/reopen.rb b/spec/rubyspec/library/syslog/shared/reopen.rb deleted file mode 100644 index fd30ab824a..0000000000 --- a/spec/rubyspec/library/syslog/shared/reopen.rb +++ /dev/null @@ -1,40 +0,0 @@ -describe :syslog_reopen, shared: true 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 "reopens the log" do - Syslog.open - lambda { Syslog.send(@method)}.should_not raise_error - Syslog.opened?.should be_true - Syslog.close - end - - it "fails with RuntimeError if the log is closed" do - lambda { Syslog.send(@method)}.should raise_error(RuntimeError) - end - - it "receives the same parameters as Syslog.open" do - Syslog.open - Syslog.send(@method, "rubyspec", 3, 8) do |s| - s.should == Syslog - s.ident.should == "rubyspec" - s.options.should == 3 - s.facility.should == Syslog::LOG_USER - s.opened?.should be_true - end - Syslog.opened?.should be_false - end - - it "returns the module" do - Syslog.open - Syslog.send(@method).should == Syslog - Syslog.close - end - end -end diff --git a/spec/rubyspec/library/syslog/warning_spec.rb b/spec/rubyspec/library/syslog/warning_spec.rb deleted file mode 100644 index 85fcb3a355..0000000000 --- a/spec/rubyspec/library/syslog/warning_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -platform_is_not :windows do - require File.expand_path('../../../spec_helper', __FILE__) - require File.expand_path('../shared/log', __FILE__) - require 'syslog' - - describe "Syslog.warning" do - it_behaves_like :syslog_log, :warning - end -end |