Sha256: a6953b412845994e4c5cd9af5edb683b8e59e1db3e72745d04fb93aec8746ead
Contents?: true
Size: 1.99 KB
Versions: 2
Compression:
Stored size: 1.99 KB
Contents
require_relative '../test-util' describe "Pione::Util::PackageParametersList" do before do @dir = Location[File.dirname(__FILE__)] end after do $stdout = STDOUT end it "should print parameters list of the package: 1" do pkg = Component::PackageReader.read(@dir + "spec_package-parameters-list_1.pione") stdout = StringIO.new("", "w") $stdout = stdout Util::PackageParametersList.print(pkg) $stdout = STDOUT stdout.string.should.include("Basic Parameters") stdout.string.should.include("Advanced Parameters") stdout.string.should.include("A :=") stdout.string.should.include("B :=") stdout.string.should.include("C :=") stdout.string.should.include("D :=") end it "should print parameters list of the package: 2" do pkg = Component::PackageReader.read(@dir + "spec_package-parameters-list_2.pione") stdout = StringIO.new("", "w") $stdout = stdout Util::PackageParametersList.print(pkg) $stdout = STDOUT stdout.string.should.include("Basic Parameters") stdout.string.should.not.include("Advanced Parameters") stdout.string.should.include("A :=") stdout.string.should.include("B :=") end it "should print parameters list of the package: 3" do pkg = Component::PackageReader.read(@dir + "spec_package-parameters-list_3.pione") stdout = StringIO.new("", "w") $stdout = stdout Util::PackageParametersList.print(pkg) $stdout = STDOUT stdout.string.should.not.include("Basic Parameters") stdout.string.should.include("Advanced Parameters") stdout.string.should.include("A :=") stdout.string.should.include("B :=") end it "should print no parameters message" do pkg = Component::PackageReader.read(@dir + "spec_package-parameters-list_4.pione") stdout = StringIO.new("", "w") $stdout = stdout Util::PackageParametersList.print(pkg) $stdout = STDOUT stdout.string.should.not.include("Basic Parameters") stdout.string.should.not.include("Advanced Parameters") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pione-0.2.2 | test/util/spec_package-parameters-list.rb |
pione-0.2.1 | test/util/spec_package-parameters-list.rb |