Skip to content

Commit

Permalink
Stub Yast::Proxy in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Jan 17, 2017
1 parent 6a3894f commit b989bda
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/lib/inst_download_release_notes_test.rb
Expand Up @@ -3,7 +3,6 @@
require_relative "../test_helper"
require "installation/clients/inst_download_release_notes"

Yast.import "Proxy"
Yast.import "InstData"
Yast.import "Pkg"
Yast.import "Language"
Expand All @@ -28,12 +27,12 @@
end

describe "#main" do
let(:proxy) { false }
let(:proxy) { double("proxy", "Read" => nil, "enabled" => false) }
let(:curl_code) { CURL_SUCCESS_CODE }
let(:language) { "en_US" }

before do
allow(Yast::Proxy).to receive(:enabled).and_return(false)
stub_const("Yast::Proxy", proxy)
allow(Yast::Pkg).to receive(:ResolvableProperties).with("", :product, "")
.and_return([product])

Expand Down

0 comments on commit b989bda

Please sign in to comment.