Hello community,

here is the log from the commit of package yast2-kdump for openSUSE:Factory 
checked in at 2015-06-03 08:24:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-kdump (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-kdump.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-kdump"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-kdump/yast2-kdump.changes  2015-02-08 
13:02:58.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-kdump.new/yast2-kdump.changes     
2015-06-03 08:24:32.000000000 +0200
@@ -1,0 +2,13 @@
+Mon May 25 21:31:15 UTC 2015 - [email protected]
+
+- Add 'sftp' dump target, which is distinct from 'ssh' in kdump
+  version 0.8.12 or newer (bsc#868704).
+- 3.1.22
+
+-------------------------------------------------------------------
+Mon May 25 20:23:55 UTC 2015 - [email protected]
+
+- Don't mention 'scp' in the SSH dump target, as the SCP protocol
+  has never been used to transfer dumps (bsc#868704).
+
+-------------------------------------------------------------------

Old:
----
  yast2-kdump-3.1.21.tar.bz2

New:
----
  yast2-kdump-3.1.22.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-kdump.spec ++++++
--- /var/tmp/diff_new_pack.LTqwUO/_old  2015-06-03 08:24:33.000000000 +0200
+++ /var/tmp/diff_new_pack.LTqwUO/_new  2015-06-03 08:24:33.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-kdump
 #
-# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-kdump
-Version:        3.1.21
+Version:        3.1.22
 Release:        0
 Summary:        Configuration of kdump
 License:        GPL-2.0

++++++ yast2-kdump-3.1.21.tar.bz2 -> yast2-kdump-3.1.22.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/.coveralls.yml 
new/yast2-kdump-3.1.22/.coveralls.yml
--- old/yast2-kdump-3.1.21/.coveralls.yml       1970-01-01 01:00:00.000000000 
+0100
+++ new/yast2-kdump-3.1.22/.coveralls.yml       2015-06-01 16:39:08.000000000 
+0200
@@ -0,0 +1 @@
+service_name: travis-ci
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/.travis.yml 
new/yast2-kdump-3.1.22/.travis.yml
--- old/yast2-kdump-3.1.21/.travis.yml  2015-02-06 14:46:01.000000000 +0100
+++ new/yast2-kdump-3.1.22/.travis.yml  2015-06-01 16:39:08.000000000 +0200
@@ -5,9 +5,9 @@
     # disable rvm, use system Ruby
     - rvm reset
     - wget 
https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
-    - sh ./travis_setup.sh -p "rake yast2-devtools yast2 yast2-packager 
yast2-storage yast2-bootloader" -g "rspec:2.14.1 yast-rake gettext"
+    - sh ./travis_setup.sh -p "rake yast2-devtools yast2 yast2-packager 
yast2-storage yast2-bootloader" -g "rspec:2.14.1 yast-rake gettext simplecov 
coveralls"
 script:
     - rake check:syntax
     - rake check:pot
-    - rake test:unit
+    - COVERAGE=1 rake test:unit
     - sudo rake install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/CONTRIBUTING.md 
new/yast2-kdump-3.1.22/CONTRIBUTING.md
--- old/yast2-kdump-3.1.21/CONTRIBUTING.md      2015-02-06 14:46:01.000000000 
+0100
+++ new/yast2-kdump-3.1.22/CONTRIBUTING.md      2015-06-01 16:39:08.000000000 
+0200
@@ -12,13 +12,13 @@
 -----------
 
 If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.novell.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
+[Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?format=guided&product=openSUSE+Factory&component=YaST2)
 or [GitHub issues](../../issues). (For Bugzilla, use the [simplified
 
registration](https://secure-www.novell.com/selfreg/jsp/createSimpleAccount.jsp)
 if you don't have an account yet.)
 
 If you find a problem, please report it either using
-[Bugzilla](https://bugzilla.novell.com/) or GitHub issues. We can't guarantee
+[Bugzilla](https://bugzilla.suse.com/) or GitHub issues. We can't guarantee
 that every bug will be fixed, but we'll try.
 
 When creating a bug report, please follow our [bug reporting
@@ -71,7 +71,7 @@
 [widely used
 
conventions](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
 
-If your commit is related to a bug in Buzgilla or an issue on GitHub, make sure
+If your commit is related to a bug in Bugzilla or an issue on GitHub, make sure
 you mention it in the commit message for cross-reference. Use format like
 bnc#775814 or gh#yast/yast-foo#42. See also [GitHub
 
autolinking](https://help.github.com/articles/github-flavored-markdown#references)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/README.md 
new/yast2-kdump-3.1.22/README.md
--- old/yast2-kdump-3.1.21/README.md    2015-02-06 14:46:01.000000000 +0100
+++ new/yast2-kdump-3.1.22/README.md    2015-06-01 16:39:08.000000000 +0200
@@ -2,4 +2,4 @@
 
 [![Travis 
Build](https://travis-ci.org/yast/yast-kdump.svg?branch=master)](https://travis-ci.org/yast/yast-kdump)
 [![Jenkins 
Build](http://img.shields.io/jenkins/s/https/ci.opensuse.org/yast-kdump-master.svg)](https://ci.opensuse.org/view/Yast/job/yast-kdump-master/)
-
+[![Coverage 
Status](https://img.shields.io/coveralls/yast/yast-kdump.svg)](https://coveralls.io/r/yast/yast-kdump?branch=master)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/package/yast2-kdump.changes 
new/yast2-kdump-3.1.22/package/yast2-kdump.changes
--- old/yast2-kdump-3.1.21/package/yast2-kdump.changes  2015-02-06 
14:46:01.000000000 +0100
+++ new/yast2-kdump-3.1.22/package/yast2-kdump.changes  2015-06-01 
16:39:08.000000000 +0200
@@ -1,4 +1,17 @@
 -------------------------------------------------------------------
+Mon May 25 21:31:15 UTC 2015 - [email protected]
+
+- Add 'sftp' dump target, which is distinct from 'ssh' in kdump
+  version 0.8.12 or newer (bsc#868704).
+- 3.1.22
+
+-------------------------------------------------------------------
+Mon May 25 20:23:55 UTC 2015 - [email protected]
+
+- Don't mention 'scp' in the SSH dump target, as the SCP protocol
+  has never been used to transfer dumps (bsc#868704).
+
+-------------------------------------------------------------------
 Fri Feb  6 13:06:53 UTC 2015 - [email protected]
 
 - The unit tests are now compatible with RSpec 3 (bnc#916364)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/package/yast2-kdump.spec 
new/yast2-kdump-3.1.22/package/yast2-kdump.spec
--- old/yast2-kdump-3.1.21/package/yast2-kdump.spec     2015-02-06 
14:46:01.000000000 +0100
+++ new/yast2-kdump-3.1.22/package/yast2-kdump.spec     2015-06-01 
16:39:08.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-kdump
-Version:        3.1.21
+Version:        3.1.22
 Release:        0
 Summary:        Configuration of kdump
 License:        GPL-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/src/clients/kdump.rb 
new/yast2-kdump-3.1.22/src/clients/kdump.rb
--- old/yast2-kdump-3.1.21/src/clients/kdump.rb 2015-02-06 14:46:01.000000000 
+0100
+++ new/yast2-kdump-3.1.22/src/clients/kdump.rb 2015-06-01 16:39:08.000000000 
+0200
@@ -106,6 +106,7 @@
               "dumptarget taget=file dir=/var/log/dump",
               "dumptarget taget=ftp server=name_server port=21 
dir=/var/log/dump user=user_name pass=path_to_file_with_password",
               "dumptarget taget=ssh server=name_server port=22 
dir=/var/log/dump user=user_name",
+              "dumptarget taget=sftp server=name_server port=22 
dir=/var/log/dump user=user_name",
               "dumptarget taget=nfs server=name_server dir=/var/log/dump",
               "dumptarget taget=cifs server=name_server share=share_name 
dir=/var/log/dump user=user_name pass=path_to_file_with_password"
             ]
@@ -252,7 +253,7 @@
             "type" => "string",
             # TRANSLATORS: CommandLine help
             "help" => _(
-              "Dump target includes type of target from: file (local 
filesystem), ftp, ssh, nfs, cifs"
+              "Dump target includes type of target from: file (local 
filesystem), ftp, ssh, sftp, nfs, cifs"
             )
           },
           "server"      => {
@@ -509,8 +510,8 @@
             )
           end 
 
-          #ssh connection
-        elsif Ops.get(@KDUMP_SAVE_TARGET, "target") == "ssh"
+          #ssh/sftp connection
+        elsif ["ssh", "sftp"].include?(@KDUMP_SAVE_TARGET["target"])
           #TRANSLATORS: CommandLine printed text
           CommandLine.Print(
             Builtins.sformat(
@@ -901,8 +902,8 @@
               return false if password == nil || password == ""
               Ops.set(@KDUMP_SAVE_TARGET, "password", password)
             end
-          when "ssh"
-            Ops.set(@KDUMP_SAVE_TARGET, "target", "ssh")
+          when "ssh", "sftp"
+            @KDUMP_SAVE_TARGET["target"] = target
 
             if Ops.get(options, "server") != nil
               Ops.set(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/src/include/kdump/dialogs.rb 
new/yast2-kdump-3.1.22/src/include/kdump/dialogs.rb
--- old/yast2-kdump-3.1.21/src/include/kdump/dialogs.rb 2015-02-06 
14:46:01.000000000 +0100
+++ new/yast2-kdump-3.1.22/src/include/kdump/dialogs.rb 2015-06-01 
16:39:08.000000000 +0200
@@ -220,7 +220,8 @@
           "items"             => [
             ["local_filesystem", _("Local Directory")],
             ["ftp", _("FTP")],
-            ["ssh", _("SSH (scp)")],
+            ["ssh", _("SSH")],
+            ["sftp", _("SFTP")],
             ["nfs", _("NFS")],
             ["cifs", _("CIFS (SMB)")]
           ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/src/include/kdump/helps.rb 
new/yast2-kdump-3.1.22/src/include/kdump/helps.rb
--- old/yast2-kdump-3.1.21/src/include/kdump/helps.rb   2015-02-06 
14:46:01.000000000 +0100
+++ new/yast2-kdump-3.1.22/src/include/kdump/helps.rb   2015-06-01 
16:39:08.000000000 +0200
@@ -68,18 +68,18 @@
             "    <i>Compressed Format</i> - Compress dump data by each page 
with gzip.<br>\n" +
             "    <i>LZO Compressed Format</i> - Slightly bigger files but much 
faster.<br>\n</p>"
         ),
-        # Dump Format - RadioButtons  1/6
+        # Dump Format - RadioButtons  1/7
         "TargetKdump"            => _(
           "<p><b>Saving Target for Kdump Image</b><br>\n    The target for 
saving kdump images. Select type of target for saving dumps.<br></p>"
         ) +
-          # Dump Format - RadioButtons  2/6
+          # Dump Format - RadioButtons  2/7
           _(
             "<p><b>Local Filestem</b> - Save kdump image in the local 
filesystem.\n" +
               "    <i>Directory for Saving Dumps</i> - The path for saving 
kdump images.\n" +
               "    Selecting directory for saving kdump images via dialog by 
pressing <i>Browse</i>\n" +
               "    <br></p>"
           ) +
-          # Dump Format - RadioButtons  3/6
+          # Dump Format - RadioButtons  3/7
           _(
             "<p><b>FTP</b> - Save kdump image via FTP.\n" +
               "    <i>Server Name</i> - The name of ftp server.\n" +
@@ -88,22 +88,36 @@
               "    <i>Enable Anonymous FTP</i> enables anonymous connection to 
server.\n" +
               "    <i>User Name</i> for ftp connection. <i>Password</i> for 
ftp connection.<br></p>"
           ) +
-          # Dump Format - RadioButtons  4/6
+          # Dump Format - RadioButtons  4/7
           _(
-            "<p><b>SSH</b> - Save kdump image via SSH.\n" +
+            "<p><b>SSH</b> - Save kdump image via SSH and 'dd' on target 
machine.\n" +
               "    <i>Server Name</i> - The name of server.\n" +
               "    <i>Port</i> - The port number for connection.\n" +
               "    <i>Directory on Server</i> - The path for saving kdump 
images.\n" +
               "    <i>User Name</i> for SSH connection.  \n" +
               "    <i>Password</i> for SSH connection.<br></p>\n"
           ) +
-          # Dump Format - RadioButtons  5/6
+          # Dump Format - RadioButtons  5/7
+          _(
+            "<p><b>SFTP</b> - Save kdump image via SFTP.\n" +
+              "    <i>Server Name</i> - The name of server.\n" +
+              "    <i>Port</i> - The port number for connection.\n" +
+              "    <i>Directory on Server</i> - The path for saving kdump 
images.\n" +
+              "    <i>User Name</i> for SSH connection.  \n" +
+              "    <i>Password</i> for SSH connection.<br></p>\n"
+          ) +
+          _(
+            "<p>The choice between SSH and SFTP depends\n" +
+            "on details of server configuration. SLE servers support both\n" +
+            "by default.</p>"
+          ) +
+          # Dump Format - RadioButtons  6/7
           _(
             "<p><b>NFS</b> - Save kdump image on NFS.\n" +
               "    <i>Server Name</i> - The name of nfs server.\n" +
               "    <i>Directory on Server</i> - The path for saving kdump 
images.<br></p>"
           ) +
-          # Dump Format - RadioButtons  6/6
+          # Dump Format - RadioButtons  7/7
           _(
             "<p><b>CIFS</b> - Save kdump image via CIFS.\n" +
               "    <i>Server Name</i> - The name of server.\n" +
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/src/include/kdump/uifunctions.rb 
new/yast2-kdump-3.1.22/src/include/kdump/uifunctions.rb
--- old/yast2-kdump-3.1.21/src/include/kdump/uifunctions.rb     2015-02-06 
14:46:01.000000000 +0100
+++ new/yast2-kdump-3.1.22/src/include/kdump/uifunctions.rb     2015-06-01 
16:39:08.000000000 +0200
@@ -140,7 +140,7 @@
 
       @ssh = VBox(
         Frame(
-          _("SSH (scp)"),
+          _("SSH / SFTP"),
           HBox(
             HSpacing(1),
             VBox(
@@ -290,9 +290,7 @@
             "dir",
             Builtins.substring(parse_target, pos)
           )
-        elsif Ops.get(@KDUMP_SAVE_TARGET, "target") == "ftp" ||
-            Ops.get(@KDUMP_SAVE_TARGET, "target") == "cifs" ||
-            Ops.get(@KDUMP_SAVE_TARGET, "target") == "ssh"
+        elsif ["ftp", "cifs", "ssh", 
"sftp"].include?(@KDUMP_SAVE_TARGET["target"])
           pos = Builtins.search(parse_target, "@")
 
           if pos != nil
@@ -320,8 +318,7 @@
             parse_target = Builtins.substring(parse_target, Ops.add(pos, 1))
           end
           # only ftp & ssh
-          if Ops.get(@KDUMP_SAVE_TARGET, "target") == "ftp" ||
-              Ops.get(@KDUMP_SAVE_TARGET, "target") == "ssh"
+          if ["ftp", "ssh", "sftp"].include?(@KDUMP_SAVE_TARGET["target"])
             pos1 = Builtins.search(parse_target, ":")
             pos = Builtins.search(parse_target, "/")
 
@@ -449,8 +446,8 @@
         end 
 
         # ssh
-      elsif Ops.get(@KDUMP_SAVE_TARGET, "target") == "ssh"
-        result = "ssh://"
+      elsif ["ssh", "sftp"].include?(@KDUMP_SAVE_TARGET["target"])
+        result = @KDUMP_SAVE_TARGET["target"] + "://"
 
         if Ops.get(@KDUMP_SAVE_TARGET, "user_name") != "" &&
             Ops.get(@KDUMP_SAVE_TARGET, "password") == ""
@@ -570,10 +567,9 @@
           Ops.get(@KDUMP_SAVE_TARGET, "server")
         )
         UI.ChangeWidget(Id("dir"), :Value, Ops.get(@KDUMP_SAVE_TARGET, "dir"))
-      elsif Ops.get(@KDUMP_SAVE_TARGET, "target") == "ssh"
+      elsif ["ssh", "sftp"].include?(@KDUMP_SAVE_TARGET["target"])
         UI.ReplaceWidget(Id("Targets"), @ssh)
-        #UI::ChangeWidget(`id ("ssh"), `Value, true);
-        UI.ChangeWidget(Id("TargetKdump"), :Value, "ssh")
+        UI.ChangeWidget(Id("TargetKdump"), :Value, 
@KDUMP_SAVE_TARGET["target"])
         if Ops.get(@KDUMP_SAVE_TARGET, "port") != ""
           UI.ChangeWidget(
             Id("port"),
@@ -688,7 +684,7 @@
             return false
           end
         end
-      elsif radiobut == "ssh" || radiobut == "nfs"
+      elsif ["ssh", "sftp", "nfs"].include?(radiobut)
         value = Builtins.tostring(UI.QueryWidget(Id("server"), :Value))
 
         if value == nil || value == ""
@@ -768,8 +764,8 @@
       event_name = Ops.get(event, "ID")
       #StoreTargetKdump ( key, event);
       StoreTargetKdumpHandle(@type)
-      radiobutton = Builtins.tostring(UI.QueryWidget(Id("TargetKdump"), 
:Value))
-      @type = radiobutton
+      radiobut = Builtins.tostring(UI.QueryWidget(Id("TargetKdump"), :Value))
+      @type = radiobut
 
       if event_name == "anonymous"
         value = Convert.to_boolean(UI.QueryWidget(Id("anonymous"), :Value))
@@ -784,7 +780,7 @@
           UI.ChangeWidget(Id("user_name"), :Enabled, true)
           UI.ChangeWidget(Id("password"), :Enabled, true)
         end
-      elsif radiobutton == "local_filesystem"
+      elsif radiobut == "local_filesystem"
         UI.ReplaceWidget(Id("Targets"), @local_filesystem)
         @set_network = false
         UI.ChangeWidget(Id("dir"), :Value, Ops.get(@KDUMP_SAVE_TARGET, "dir"))
@@ -795,7 +791,7 @@
           )
           UI.ChangeWidget(Id("dir"), :Value, dir)
         end
-      elsif radiobutton == "ftp"
+      elsif radiobut == "ftp"
         UI.ReplaceWidget(Id("Targets"), @ftp)
 
         if Ops.get(@KDUMP_SAVE_TARGET, "port") != ""
@@ -825,7 +821,7 @@
             Ops.get(@KDUMP_SAVE_TARGET, "password")
           )
         end
-      elsif radiobutton == "ssh"
+      elsif ["ssh", "sftp"].include?(radiobut)
         UI.ReplaceWidget(Id("Targets"), @ssh)
 
         if Ops.get(@KDUMP_SAVE_TARGET, "port") != ""
@@ -838,7 +834,7 @@
         Builtins.foreach(["server", "user_name", "dir", "password"]) do |key2|
           UI.ChangeWidget(Id(key2), :Value, Ops.get(@KDUMP_SAVE_TARGET, key2))
         end
-      elsif radiobutton == "nfs"
+      elsif radiobut == "nfs"
         UI.ReplaceWidget(Id("Targets"), @nfs)
         UI.ChangeWidget(
           Id("server"),
@@ -846,7 +842,7 @@
           Ops.get(@KDUMP_SAVE_TARGET, "server")
         )
         UI.ChangeWidget(Id("dir"), :Value, Ops.get(@KDUMP_SAVE_TARGET, "dir"))
-      elsif radiobutton == "cifs"
+      elsif radiobut == "cifs"
         UI.ReplaceWidget(Id("Targets"), @cifs)
         Builtins.foreach(["server", "dir", "share", "user_name", "password"]) 
do |key2|
           UI.ChangeWidget(Id(key2), :Value, Ops.get(@KDUMP_SAVE_TARGET, key2))
@@ -946,8 +942,8 @@
         else
           Ops.set(@KDUMP_SAVE_TARGET, "dir", "")
         end
-      elsif radiobut == "ssh"
-        Ops.set(@KDUMP_SAVE_TARGET, "target", "ssh")
+      elsif ["ssh", "sftp"].include?(radiobut)
+        @KDUMP_SAVE_TARGET["target"] = radiobut
 
         #server
         value = Builtins.tostring(UI.QueryWidget(Id("server"), :Value))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/test/fadump_test.rb 
new/yast2-kdump-3.1.22/test/fadump_test.rb
--- old/yast2-kdump-3.1.21/test/fadump_test.rb  2015-02-06 14:46:01.000000000 
+0100
+++ new/yast2-kdump-3.1.22/test/fadump_test.rb  2015-06-01 16:39:08.000000000 
+0200
@@ -1,48 +1,46 @@
 #! /usr/bin/env rspec
 
-ENV["Y2DIR"] = File.expand_path("../../src", __FILE__)
-
-require "yast"
+require_relative "./test_helper"
 
 Yast.import "Kdump"
 Yast.import "Arch"
 
 describe "#fadump_supported?" do
   it "returns that fadump is supported on ppc64 architecture" do
-    Yast::Arch.stub(:ppc64).and_return(true)
+    expect(Yast::Arch).to receive(:ppc64).and_return(true)
     expect(Yast::Kdump.fadump_supported?).to eq(true)
   end
 
   it "return that fadump is not supported on other architectures" do
-    Yast::Arch.stub(:ppc64).and_return(false)
+    expect(Yast::Arch).to receive(:ppc64).and_return(false)
     expect(Yast::Kdump.fadump_supported?).to eq(false)
   end
 end
 
 describe "#use_fadump" do
   it "returns true if fadump is supported on this architecture" do
-    Yast::Kdump.stub(:fadump_supported?).and_return(true)
+    expect(Yast::Kdump).to receive(:fadump_supported?).twice.and_return(true)
     expect(Yast::Kdump.use_fadump(true)).to eq(true)
     expect(Yast::Kdump.use_fadump(false)).to eq(true)
   end
 
   it "returns false if it's not supported on this architecture" do
-    Yast::Kdump.stub(:fadump_supported?).and_return(false)
+    expect(Yast::Kdump).to receive(:fadump_supported?).and_return(false)
     expect(Yast::Kdump.use_fadump(true)).to eq(false)
   end
 
   it "returns true if disabling fadump" do
-    Yast::Kdump.stub(:fadump_supported?).and_return(true)
+    expect(Yast::Kdump).to receive(:fadump_supported?).and_return(true)
     expect(Yast::Kdump.use_fadump(false)).to eq(true)
 
-    Yast::Kdump.stub(:fadump_supported?).and_return(false)
+    expect(Yast::Kdump).to receive(:fadump_supported?).and_return(false)
     expect(Yast::Kdump.use_fadump(false)).to eq(true)
   end
 end
 
 describe "#using_fadump?" do
  it "returns that fadump is in use if previously set" do
-   Yast::Kdump.stub(:fadump_supported?).and_return(true)
+   expect(Yast::Kdump).to receive(:fadump_supported?).twice.and_return(true)
 
    Yast::Kdump.use_fadump(true)
    expect(Yast::Kdump.using_fadump?).to eq(true)
@@ -62,7 +60,7 @@
   it "returns true if use_fadump changed" do
     Yast::Kdump.ReadKdumpSettings
 
-    Yast::Kdump.stub(:fadump_supported?).and_return(true)
+    expect(Yast::Kdump).to receive(:fadump_supported?).and_return(true)
     original_value = Yast::Kdump.using_fadump?
     Yast::Kdump.use_fadump(! original_value)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/test/kdump_test.rb 
new/yast2-kdump-3.1.22/test/kdump_test.rb
--- old/yast2-kdump-3.1.21/test/kdump_test.rb   2015-02-06 14:46:01.000000000 
+0100
+++ new/yast2-kdump-3.1.22/test/kdump_test.rb   2015-06-01 16:39:08.000000000 
+0200
@@ -1,41 +1,40 @@
 #!/usr/bin/env rspec
-ENV["Y2DIR"] = File.expand_path("../../src", __FILE__)
 
-require "yast"
-include Yast
+require_relative "./test_helper"
+
 Yast.import "Kdump"
 
-describe Kdump do
+describe Yast::Kdump do
   # allocated_memory is a string   in megabytes
   # total_memory     is an integer in megabytes
   describe "#ProposeAllocatedMemory" do
     context "when already proposed" do
       before(:each) do
-        Kdump.allocated_memory = "42"
+        Yast::Kdump.allocated_memory = "42"
       end
       it "proposes the current value" do
-        Kdump.ProposeAllocatedMemory
-        expect(Kdump.allocated_memory).to eq "42"
+        Yast::Kdump.ProposeAllocatedMemory
+        expect(Yast::Kdump.allocated_memory).to eq "42"
       end
     end
 
     context "when not yet proposed" do
       before(:each) do
-        Kdump.allocated_memory = "0"
+        Yast::Kdump.allocated_memory = "0"
       end
 
       context "when the proposal tool is not implemented yet" do
         before(:each) do
-          SCR.stub(:Execute).
-            with(path(".target.bash"), /^cp/).and_return(0)
-          SCR.stub(:Execute).
-            with(path(".target.bash_output"), /^kdumptool/).
-            and_return({"exit" => 1, "stdout" => "", "stderr" => "not there" })
+          allow(Yast::SCR).to receive(:Execute)
+            .with(Yast::Path.new(".target.bash"), /^cp/).and_return(0)
+          expect(Yast::SCR).to receive(:Execute)
+            .with(Yast::Path.new(".target.bash_output"), /^kdumptool/)
+            .and_return({"exit" => 1, "stdout" => "", "stderr" => "not there" 
})
         end
 
         it "proposes a positive integer" do
-          Kdump.ProposeAllocatedMemory
-          expect(Kdump.allocated_memory.to_i).to be > 0
+          Yast::Kdump.ProposeAllocatedMemory
+          expect(Yast::Kdump.allocated_memory.to_i).to be > 0
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-kdump-3.1.21/test/test_helper.rb 
new/yast2-kdump-3.1.22/test/test_helper.rb
--- old/yast2-kdump-3.1.21/test/test_helper.rb  1970-01-01 01:00:00.000000000 
+0100
+++ new/yast2-kdump-3.1.22/test/test_helper.rb  2015-06-01 16:39:08.000000000 
+0200
@@ -0,0 +1,25 @@
+srcdir = File.expand_path("../../src", __FILE__)
+y2dirs = ENV.fetch("Y2DIR", "").split(":")
+ENV["Y2DIR"] = y2dirs.unshift(srcdir).join(":")
+
+require "yast"
+
+if ENV["COVERAGE"]
+  require "simplecov"
+  SimpleCov.start
+
+  # For coverage we need to load all ruby files
+  # Note that clients/ are excluded because they run too eagerly by design
+  Dir["#{srcdir}/{include,modules}/**/*.rb"].each do |f|
+    require_relative f
+  end
+
+  # use coveralls for on-line code coverage reporting at Travis CI
+  if ENV["TRAVIS"]
+    require "coveralls"
+    SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
+      SimpleCov::Formatter::HTMLFormatter,
+      Coveralls::SimpleCov::Formatter
+    ]
+  end
+end


Reply via email to