Skip to content

Commit

Permalink
mock env instead of overwritting
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jul 18, 2016
1 parent c8bbff1 commit 7c75acf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/grub2base_test.rb
Expand Up @@ -122,7 +122,7 @@

context "with TERM=\"linux\"" do
before do
ENV["TERM"] = "linux"
allow(ENV).to receive(:"[]").with("TERM").and_return("linux")
end

it "proposes to use serial terminal" do
Expand All @@ -134,7 +134,7 @@

context "on other TERM" do
before do
ENV["TERM"] = "xterm"
allow(ENV).to receive(:"[]").with("TERM").and_return("xterm")
end

it "proposes to use console terminal" do
Expand Down Expand Up @@ -249,7 +249,7 @@

context "with TERM=\"linux\"" do
before do
ENV["TERM"] = "linux"
allow(ENV).to receive(:"[]").with("TERM").and_return("linux")
end

it "proposes to use serial console with \"TERM=linux console=ttyS0 console=ttyS1\"" do
Expand All @@ -261,7 +261,7 @@

context "on other TERM" do
before do
ENV["TERM"] = "xterm"
allow(ENV).to receive(:"[]").with("TERM").and_return("xterm")
end

it "proposes dumb term and sets 8 iuvc terminals" do
Expand Down

0 comments on commit 7c75acf

Please sign in to comment.