Skip to content

Commit

Permalink
Rubocop fix: Style/ColonMethodCall
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 20, 2017
1 parent 5704890 commit d5f8751
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/modules/DASDController.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def Export
l = Builtins.maplist(active_devices) do |_i, d|
Builtins.filter(d) do |k, _v|
Builtins.contains(["channel", "format", "diag"], k)
end
end
end

{
Expand Down
4 changes: 2 additions & 2 deletions src/modules/ZFCPController.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def GetControllers
@controllers = Builtins.maplist(@controllers) do |c|
Builtins.filter(c) do |k, _v|
Builtins.contains(["sysfs_bus_id"], k)
end
end
end

# zKVM uses virtio devices instead of ZFCP, skip the warning in that case
Expand Down Expand Up @@ -394,7 +394,7 @@ def ProbeDisks
disks_tapes = Builtins.maplist(disks_tapes) do |d|
Builtins.filter(d) do |k, _v|
Builtins.contains(["dev_name", "detail", "vendor", "device"], k)
end
end
end

index = -1
Expand Down
2 changes: 1 addition & 1 deletion test/dasd_controller_is_available_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
describe "Yast::DASDController" do
describe "#IsAvailable" do
it "returns true if .probe.disk contains DASDs" do
expect(Yast::SCR).to receive(:Read).with(Yast::path(".probe.disk")).once.and_return(load_data("probe_disk_dasd.yml"))
expect(Yast::SCR).to receive(:Read).with(Yast.path(".probe.disk")).once.and_return(load_data("probe_disk_dasd.yml"))
expect(Yast::DASDController.IsAvailable()).to eq(true)
end
end
Expand Down
6 changes: 3 additions & 3 deletions test/zfcp_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

describe "#GetControllers" do
it "Returns all controllers" do
expect(Yast::SCR).to receive(:Read).with(Yast::path(".probe.storage")).once.and_return(load_data("probe_storage.yml"))
expect(Yast::SCR).to receive(:Read).with(Yast.path(".probe.storage")).once.and_return(load_data("probe_storage.yml"))

# Removing all fcp devices from blacklist
expect(Yast::SCR).to receive(:Execute).with(anything, /\/sbin\/vmcp q v fcp/).and_return(
Expand Down Expand Up @@ -49,8 +49,8 @@

describe "#ProbeDisks" do
it "Probing disk" do
expect(Yast::SCR).to receive(:Read).with(Yast::path(".probe.disk")).once.and_return(load_data("probe_disk.yml"))
expect(Yast::SCR).to receive(:Read).with(Yast::path(".probe.tape")).once.and_return([])
expect(Yast::SCR).to receive(:Read).with(Yast.path(".probe.disk")).once.and_return(load_data("probe_disk.yml"))
expect(Yast::SCR).to receive(:Read).with(Yast.path(".probe.tape")).once.and_return([])

expect(Yast::ZFCPController.ProbeDisks()).to eq(nil)
expect(Yast::ZFCPController.devices).to eq(load_data("device_list.yml"))
Expand Down

0 comments on commit d5f8751

Please sign in to comment.