Skip to content

Commit

Permalink
Merge pull request #171 from yast/cio_ignore_condev
Browse files Browse the repository at this point in the history
fix dependency on yast2-bootloader and testsuite
  • Loading branch information
jreidinger committed Mar 13, 2014
2 parents 5beefba + cb72881 commit 9c0ef7b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/cio_ignore_test.rb
Expand Up @@ -106,9 +106,10 @@

describe "first parameter \"Write\"" do
before(:each) do
Yast.import "Bootloader"
allow(Yast::Bootloader).to receive(:Write)
allow(Yast::Bootloader).to receive(:Read)
stub_const("Yast::Bootloader", double())

allow(Yast::Bootloader).to receive(:Write) { true }
allow(Yast::Bootloader).to receive(:Read) { true }
allow(Yast::Bootloader).to receive(:setKernelParam) { true }

allow(Yast::SCR).to receive(:Execute).
Expand Down Expand Up @@ -159,8 +160,8 @@
end

it "adds kernel parameters IPLDEV and CONDEV to the bootloader" do
expect(Yast::Bootloader).to receive(:Write).once
expect(Yast::Bootloader).to receive(:Read).once
expect(Yast::Bootloader).to receive(:Write).once { true }
expect(Yast::Bootloader).to receive(:Read).once { true }
allow(Yast::Bootloader).to receive(:setKernelParam).once.
with("DEFAULT", "IPLDEV", "true").and_return(true)
allow(Yast::Bootloader).to receive(:setKernelParam).once.
Expand All @@ -171,7 +172,7 @@

it "raises an exception if modifying kernel parameters failed" do
expect(Yast::Bootloader).to receive(:Write).never
expect(Yast::Bootloader).to receive(:Read).once
expect(Yast::Bootloader).to receive(:Read).once { true }
allow(Yast::Bootloader).to receive(:setKernelParam).once.
with("DEFAULT", "IPLDEV", "true").and_return(true)
allow(Yast::Bootloader).to receive(:setKernelParam).once.
Expand Down

0 comments on commit 9c0ef7b

Please sign in to comment.