Skip to content

Commit

Permalink
make rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Feb 13, 2015
1 parent 9a0becd commit 5e9466b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/bootloader/disk_change_detector.rb
Expand Up @@ -45,7 +45,7 @@ def changes
# TRANSLATORS: %s stands for partition
ret <<
_("Selected custom bootloader partition %s is not available any more.") %
Yast::BootCommon.globals["boot_custom"]
Yast::BootCommon.globals["boot_custom"]
end

ret
Expand Down
2 changes: 1 addition & 1 deletion src/modules/BootArch.rb
Expand Up @@ -51,7 +51,7 @@ def DefaultKernelParams(resume)
ret << " splash=silent quiet showopts"
return ret
elsif Arch.s390
# TODO maybe use ENV directly?
# TODO: maybe use ENV directly?
file_desc = SCR.Execute(path(".target.bash_output"), "echo $TERM")
env_term = file_desc["stdout"]
if env_term == "linux\n"
Expand Down
5 changes: 2 additions & 3 deletions test/boot_arch_test.rb
Expand Up @@ -109,13 +109,13 @@ def stub_arch(arch)
end

it "adds serial console if ENV{TERM} is linux" do
allow(Yast::SCR).to receive(:Execute).with(anything(), "echo $TERM").and_return("stdout" => "linux\n")
allow(Yast::SCR).to receive(:Execute).with(anything, "echo $TERM").and_return("stdout" => "linux\n")

expect(subject.DefaultKernelParams("/dev/sda2")).to include("TERM=linux console=ttyS0 console=ttyS1")
end

it "adds TERM=dumb and hvc_iucv=8 for other TERM" do
allow(Yast::SCR).to receive(:Execute).with(anything(), "echo $TERM").and_return("stdout" => "\n")
allow(Yast::SCR).to receive(:Execute).with(anything, "echo $TERM").and_return("stdout" => "\n")

expect(subject.DefaultKernelParams("/dev/sda2")).to include("hvc_iucv=8 TERM=dumb")
end
Expand All @@ -130,7 +130,6 @@ def stub_arch(arch)
expect(subject.DefaultKernelParams("/dev/sda2")).to_not include("console=ttyS0")
end


end

context "on other archs" do
Expand Down

0 comments on commit 5e9466b

Please sign in to comment.