Skip to content

Commit

Permalink
Remove unnecesary code from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Jul 31, 2019
1 parent 9a3ec0c commit c179631
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 47 deletions.
16 changes: 0 additions & 16 deletions test/y2network/sysconfig/connection_config_writers/bridge_test.rb
Expand Up @@ -28,22 +28,6 @@
describe Y2Network::Sysconfig::ConnectionConfigWriters::Bridge do
subject(:handler) { described_class.new(file) }

def file_content(scr_root, file)
path = File.join(scr_root, file.path.to_s)
File.read(path)
end

let(:scr_root) { Dir.mktmpdir }

around do |example|
begin
FileUtils.cp_r(File.join(DATA_PATH, "scr_read", "etc"), scr_root)
change_scr_root(scr_root, &example)
ensure
FileUtils.remove_entry(scr_root)
end
end

let(:conn) do
instance_double(
Y2Network::ConnectionConfig::Bridge,
Expand Down
Expand Up @@ -28,11 +28,6 @@
describe Y2Network::Sysconfig::ConnectionConfigWriters::Dummy do
subject(:handler) { described_class.new(file) }

def file_content(scr_root, file)
path = File.join(scr_root, file.path.to_s)
File.read(path)
end

let(:scr_root) { Dir.mktmpdir }

around do |example|
Expand Down
Expand Up @@ -29,11 +29,6 @@
describe Y2Network::Sysconfig::ConnectionConfigWriters::Ethernet do
subject(:handler) { described_class.new(file) }

def file_content(scr_root, file)
path = File.join(scr_root, file.path.to_s)
File.read(path)
end

let(:scr_root) { Dir.mktmpdir }

around do |example|
Expand Down
Expand Up @@ -29,11 +29,6 @@
describe Y2Network::Sysconfig::ConnectionConfigWriters::Infiniband do
subject(:handler) { described_class.new(file) }

def file_content(scr_root, file)
path = File.join(scr_root, file.path.to_s)
File.read(path)
end

let(:scr_root) { Dir.mktmpdir }

around do |example|
Expand Down
16 changes: 0 additions & 16 deletions test/y2network/sysconfig/connection_config_writers/vlan_test.rb
Expand Up @@ -29,22 +29,6 @@
describe Y2Network::Sysconfig::ConnectionConfigWriters::Vlan do
subject(:handler) { described_class.new(file) }

def file_content(scr_root, file)
path = File.join(scr_root, file.path.to_s)
File.read(path)
end

let(:scr_root) { Dir.mktmpdir }

around do |example|
begin
FileUtils.cp_r(File.join(DATA_PATH, "scr_read", "etc"), scr_root)
change_scr_root(scr_root, &example)
ensure
FileUtils.remove_entry(scr_root)
end
end

let(:conn) do
instance_double(
Y2Network::ConnectionConfig::Vlan,
Expand Down

0 comments on commit c179631

Please sign in to comment.