Sha256: 9743dd32c8ec537f26981cf37d00bec11d9a0f460a1e5785b3ed0b74ee742831
Contents?: true
Size: 1.1 KB
Versions: 3
Compression:
Stored size: 1.1 KB
Contents
# Polisher Yum Spec # # Licensed under the MIT license # Copyright (C) 2013-2014 Red Hat, Inc. require 'polisher/yum' module Polisher describe Yum do describe "#versions_for" do before(:each) do end it "uses yum to retreive versions" do expected = "/usr/bin/yum info rubygem-rails" result = AwesomeSpawn::CommandResult.new expected, "", "", 0 AwesomeSpawn.should_receive(:run).with(expected).and_return(result) described_class.version_for "rails" end it "returns versions" do result = AwesomeSpawn::CommandResult.new "", "Version: 1.0.0", "", 0 AwesomeSpawn.should_receive(:run).and_return(result) described_class.version_for("rails") == '1.0.0' end it "invokes block with versions" do cb = proc {} cb.should_receive(:call).with(:yum, 'rails', ['1.0.0']) result = AwesomeSpawn::CommandResult.new "", "Version: 1.0.0", "", 0 AwesomeSpawn.should_receive(:run).and_return(result) described_class.version_for("rails", &cb) end end end # describe Koji end # module Polisher
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
polisher-0.9.1 | spec/yum_spec.rb |
polisher-0.8.1 | spec/yum_spec.rb |
polisher-0.7.1 | spec/yum_spec.rb |