Skip to content

Commit

Permalink
Extended testsuite for readIPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Sep 14, 2016
1 parent a757168 commit 723faa9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/lan_test.rb
Expand Up @@ -212,13 +212,16 @@ def expect_modification_succeedes(modname, method)
end

describe "LanClass#readIPv6" do
before(:each) do
allow(Yast::FileUtils).to receive(:Exists).and_return(true)
end

it "reads IPv6 setup from /etc/sysctl.conf" do
allow(Yast::FileUtils).to receive(:Exists).and_return(true)
string_stub_scr_read("/etc/sysctl.conf")

expect(Yast::Lan.readIPv6).to be false
end

it "returns true when /etc/sysctl.conf is missing" do
allow(Yast::FileUtils).to receive(:Exists).and_return(false)

expect(Yast::Lan.readIPv6).to be true
end
end

0 comments on commit 723faa9

Please sign in to comment.