Sha256: 8da114df292841cc7285d2f946c3dca6ed47f279be88b10d9cf0deee7f31770c
Contents?: true
Size: 936 Bytes
Versions: 1
Compression:
Stored size: 936 Bytes
Contents
require File.expand_path( File.join(File.dirname(__FILE__), "..", "..", "spec_helper") ) describe DirCatQuery do before do @testdata_dirname = TEST_DIR @certified_output_dirname = File.join( @testdata_dirname, "certified_output" ) end it "should accept -h (help) option" do out = with_stdout_captured do args = %w{-h} DirCatQuery.new.parse_args(args) end out.should match /Usage:/ end it "should accept --version option" do out = with_stdout_captured do args = %w{--version} DirCatQuery.new.parse_args(args) end out.should match /#{DirCat::version}/ end it "should show catalogs info" do cat_filename = File.join( @certified_output_dirname, "dircat1.yaml" ) out = with_stdout_captured do args = "#{cat_filename}" DirCatQuery.new.parse_args(args.split) end out.should match /file: 2/ out.should match /Bytes: 4/ end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dircat-0.1.4 | spec/dircat/cli/dircat_query_spec.rb |