Commit 5de81e32 authored by Bryan McLellan's avatar Bryan McLellan
Browse files

[CHEF-2634] Update spec tests to new provider syntax

parent 2f62e1f8
......@@ -100,14 +100,14 @@ describe Chef::Provider::Package::Freebsd, "load_current_resource" do
it "should return the ports candidate version when given a valid port path" do
@provider.stub!(:port_path).and_return("/usr/ports/shells/zsh")
make_v = OpenStruct.new(:stdout => "4.3.6\n")
@provider.should_receive(:shell_out!).with("make -V PORTVERSION -f /usr/ports/shells/zsh/Makefile", :env => nil, :returns=>[0,1]).and_return(make_v)
@provider.should_receive(:shell_out!).with("make -V PORTVERSION", {:cwd=>"/usr/ports/shells/zsh", :returns=>[0, 1], :env=>nil}).and_return(make_v)
@provider.ports_candidate_version.should == "4.3.6"
end
it "should figure out the package name" do
@provider.stub!(:port_path).and_return("/usr/ports/shells/zsh")
make_v = OpenStruct.new(:stdout => "zsh-4.3.6_7\n")
@provider.should_receive(:shell_out!).with('make -V PKGNAME -f /usr/ports/shells/zsh/Makefile', :env => nil, :returns=>[0,1]).and_return(make_v)
@provider.should_receive(:shell_out!).with("make -V PKGNAME", {:cwd=>"/usr/ports/shells/zsh", :env=>nil, :returns=>[0, 1]}).and_return(make_v)
#@provider.should_receive(:ports_makefile_variable_value).with("PKGNAME").and_return("zsh-4.3.6_7")
@provider.package_name.should == "zsh"
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment