Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Sep 2, 2019
1 parent 567f369 commit 70d488e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/y2network/sysconfig/interfaces_writer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
allow(Yast::Execute).to receive(:on_target)
allow(eth0).to receive(:hardware).and_return(hardware)
allow(writer).to receive(:sleep)

# prevent collision with real hardware
allow(Y2Network::UdevRule).to receive(:all).and_return([])
end

around do |example|
Expand Down
6 changes: 5 additions & 1 deletion test/y2network/widgets/blink_button_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@
require "cwm/rspec"

require "y2network/widgets/blink_button"
require "y2network/interface_config_builder"

describe Y2Network::Widgets::BlinkButton do
subject { described_class.new("IFCFG" => "eth0") }
let(:builder) { Y2Network::InterfaceConfigBuilder.for("eth") }
subject { described_class.new(builder) }

before do
builder.name = "eth0"
# no real blinking
allow(Yast::SCR).to receive(:Execute)
end
Expand Down

0 comments on commit 70d488e

Please sign in to comment.