Skip to content

Instantly share code, notes, and snippets.

@mvidner
Created March 11, 2014 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvidner/9482895 to your computer and use it in GitHub Desktop.
Save mvidner/9482895 to your computer and use it in GitHub Desktop.
#!/usr/bin/env rspec
ENV["Y2DIR"] = File.expand_path("../../src", __FILE__)
require "yast"
require "pp"
def clone(auto_client)
Yast::WFM.CallFunction(auto_client, ['Read'])
Yast::WFM.CallFunction(auto_client, ['SetModified'])
Yast::WFM.CallFunction(auto_client, ['Export'])
end
describe "LanAutoClient" do
describe "Export" do
it "is idempotent" do
export1 = Yast::WFM.CallFunction('lan_auto', ['Export'])
export2 = Yast::WFM.CallFunction('lan_auto', ['Export'])
expect(export2).to eq(export1)
end
end
describe "Clone" do
it "is idempotent" do
export1 = clone('lan_auto')
pp export1
export2 = clone('lan_auto')
expect(export2).to eq(export1)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment