Skip to content

Commit

Permalink
avoid name collision between class and module
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger authored and mvidner committed Jul 1, 2015
1 parent 9cce4b3 commit 1105720
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/s390_helpers_test.rb
Expand Up @@ -8,7 +8,7 @@
$LOAD_PATH.unshift File.expand_path("../../src", __FILE__)
require "include/network/lan/s390"

class NetworkLanS390Include < Yast::Client
class NetworkLanS390IncludeTestClient < Yast::Client
include Singleton

def initialize
Expand All @@ -20,6 +20,7 @@ def initialize
Yast.import "FileUtils"

describe "NetworkLanS390Include::s390_DriverLoaded" do
subject { NetworkLanS390IncludeTestClient.instance }
DEVNAME = "devname"

before(:each) do
Expand All @@ -36,8 +37,7 @@ def initialize
.with("#{Yast::NetworkLanS390Include::SYS_DIR}/#{DEVNAME}")
.and_return(true)

expect(NetworkLanS390Include.instance.s390_DriverLoaded(DEVNAME))
.to be true
expect(subject.s390_DriverLoaded(DEVNAME)).to be true
end

it "fails when driver is not loaded" do
Expand All @@ -46,7 +46,6 @@ def initialize
.with("#{Yast::NetworkLanS390Include::SYS_DIR}/#{DEVNAME}")
.and_return(false)

expect(NetworkLanS390Include.instance.s390_DriverLoaded(DEVNAME))
.to be false
expect(subject.s390_DriverLoaded(DEVNAME)).to be false
end
end

0 comments on commit 1105720

Please sign in to comment.