Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Dec 19, 2017
1 parent 7af69c8 commit c8350be
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions test/y2partitioner/widgets/overview_test.rb
Expand Up @@ -29,13 +29,22 @@
describe Y2Partitioner::Widgets::OverviewTreePager do
before do
devicegraph_stub(scenario)
subject.init
Yast::ProductFeatures.Import(control_file_content)

allow(Yast2::Popup).to receive(:show).and_return(:yes)
end

let(:control_file_content) do
file_path = File.join(DATA_PATH, "control_files", control_file)
Yast::XML.XMLToYCPFile(file_path)
end

subject { described_class.new("hostname") }

let(:scenario) { "lvm-two-vgs.yml" }

let(:control_file) { "caasp.xml" }

include_examples "CWM::Pager"

describe "#device_page" do
Expand Down Expand Up @@ -176,8 +185,6 @@
# FIXME
describe "#validate" do
before do
Yast::ProductFeatures.Import(control_file_content)

Y2Storage::StorageManager.create_test_instance
allow(Y2Storage::StorageManager.instance).to receive(:arch).and_return(storage_arch)

Expand All @@ -190,15 +197,6 @@

let(:storage_arch) { instance_double("::Storage::Arch") }

let(:control_file_content) do
if control_file
file = File.join(DATA_PATH, "control_files", control_file)
Yast::XML.XMLToYCPFile(file)
else
{}
end
end

let(:scenario) { "mixed_disks.yml" }

let(:current_graph) { Y2Partitioner::DeviceGraphs.instance.current }
Expand Down

0 comments on commit c8350be

Please sign in to comment.