Skip to content

Commit

Permalink
Merge pull request #115 from imobach/fix-flickering-tests
Browse files Browse the repository at this point in the history
Avoid flickering tests for AutoinstClassClass
  • Loading branch information
imobachgs committed Apr 29, 2015
2 parents 80b10f0 + 2be5b41 commit 1c8ef3b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/AutoinstClass_test.rb
Expand Up @@ -219,6 +219,7 @@
let(:output_xml) { File.read(output_path) }
let(:dontmerge) { [] }
let(:merge_xslt_path) { File.join('xslt', 'merge.xslt') }
let(:conf_to_merge) { { "class" => "swap", "name" => "largeswap.xml" } }
let(:xsltproc_command) {
"/usr/bin/xsltproc --novalid --param replace \"'false'\" " \
"--param with \"'#{subject.findPath("largeswap.xml", "swap")}'\" "\
Expand Down Expand Up @@ -246,7 +247,7 @@
it 'executes xsltproc and returns a hash with info about the result' do
expect(Yast::SCR).to receive(:Execute).
with(Yast::Path.new(".target.bash_output"), xsltproc_command, {}).and_call_original
out = subject.MergeClasses(subject.confs[0], base_profile_path, 'output.xml')
out = subject.MergeClasses(conf_to_merge, base_profile_path, 'output.xml')
expect(out).to eq({ 'exit' => 0, 'stderr' => '', 'stdout' => '' })
end

Expand All @@ -256,7 +257,7 @@
it 'merges elements from profile and configuration' do
expect(Yast::SCR).to receive(:Execute).
with(Yast::Path.new(".target.bash_output"), xsltproc_command, {}).and_call_original
subject.MergeClasses(subject.confs[0], base_profile_path, 'output.xml')
subject.MergeClasses(conf_to_merge, base_profile_path, 'output.xml')
expect(output_xml).to eq(expected_xml)
end
end
Expand All @@ -275,7 +276,7 @@
it 'does not merge those elements' do
expect(Yast::SCR).to receive(:Execute).
with(Yast::Path.new(".target.bash_output"), xsltproc_command, {}).and_call_original
subject.MergeClasses(subject.confs[0], base_profile_path, 'output.xml')
subject.MergeClasses(conf_to_merge, base_profile_path, 'output.xml')
expect(output_xml).to eq(expected_xml)
end
end
Expand Down

0 comments on commit 1c8ef3b

Please sign in to comment.