Skip to content

Commit

Permalink
make rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jan 19, 2018
1 parent 801f0bb commit 193bf2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/lib/y2storage/device.rb
Expand Up @@ -36,7 +36,6 @@ class Device
wrap_class Storage::Device,
downcast_to: ["BlkDevice", "Mountable", "PartitionTables::Base", "LvmPv", "LvmVg"]


storage_forward :storage_eql, to: :==
protected :storage_eql

Expand All @@ -49,7 +48,7 @@ class Device
def ==(other)
return false if self.class != other.class

self.storage_eql(other)
storage_eql(other)
end

# compare two devices.
Expand Down
8 changes: 4 additions & 4 deletions test/y2storage/device_test.rb
Expand Up @@ -113,12 +113,12 @@
describe "#eql?" do
it "allows correct array subtracting" do
arr1 = [
Y2Storage::Partition.find_by_name(fake_devicegraph, "/dev/sda1"),
Y2Storage::Partition.find_by_name(fake_devicegraph, "/dev/sda2"),
Y2Storage::Partition.find_by_name(fake_devicegraph, "/dev/sda1"),
Y2Storage::Partition.find_by_name(fake_devicegraph, "/dev/sda2")
]
arr2 = [
Y2Storage::Partition.find_by_name(fake_devicegraph, "/dev/sda1"),
Y2Storage::Partition.find_by_name(fake_devicegraph, "/dev/sde1"),
Y2Storage::Partition.find_by_name(fake_devicegraph, "/dev/sda1"),
Y2Storage::Partition.find_by_name(fake_devicegraph, "/dev/sde1")
]

expect(arr1 - arr2).to eq([Y2Storage::Partition.find_by_name(fake_devicegraph, "/dev/sda2")])
Expand Down

0 comments on commit 193bf2f

Please sign in to comment.