From 1105720efe18f81bc8b8ebb8983b60caa5d15394 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 2 Mar 2015 18:36:50 +0100 Subject: [PATCH] avoid name collision between class and module --- test/s390_helpers_test.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/s390_helpers_test.rb b/test/s390_helpers_test.rb index d92f0c46b..1d3353a1c 100755 --- a/test/s390_helpers_test.rb +++ b/test/s390_helpers_test.rb @@ -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 @@ -20,6 +20,7 @@ def initialize Yast.import "FileUtils" describe "NetworkLanS390Include::s390_DriverLoaded" do + subject { NetworkLanS390IncludeTestClient.instance } DEVNAME = "devname" before(:each) do @@ -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 @@ -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