Skip to content

Commit

Permalink
fix tests to not break with any log change
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Oct 30, 2019
1 parent a6ae46b commit 860e469
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/AutoinstFunctions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def base_product(name)
end

it "logs a message" do
allow(subject.log).to receive(:info).and_call_original
expect(subject.log).to receive(:info).at_least(1).with(/not a valid software section/)

subject.selected_product
Expand Down
12 changes: 12 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,15 @@ def dummy
end
Timezone = TimezoneClass.new
end

require "y2packager/medium_type"

RSpec.configure do |c|
c.mock_with :rspec do |mocks|
mocks.verify_partial_doubles = true
end

c.before do
allow(Y2Packager::MediumType).to receive(:detect_medium_type).and_return(:standard)
end
end

0 comments on commit 860e469

Please sign in to comment.