Sha256: 27224ecc28d0eb63c8a3a8b4113982ce25ed8a760e1cbf9471091bfdf162d6d2

Contents?: true

Size: 711 Bytes

Versions: 1

Compression:

Stored size: 711 Bytes

Contents

require File.expand_path( File.join(File.dirname(__FILE__), "..", "..", "spec_helper") )

describe CommandQuery do

  before do
    @certified_output_dirname = File.join( TEST_DIR, "certified_output" )
  end

  it "should accept -h (help) option" do
    out = with_stdout_captured do
      args = %w{query -h}
      CliDirCat.new.parse_and_execute(args)
    end
    out.should match /Usage:/
  end

  it "should show catalogs info" do
    cat_filename = File.join( @certified_output_dirname, "dircat1.yaml" )
    out = with_stdout_captured do
      args = "query #{cat_filename}"
      CliDirCat.new.parse_and_execute(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.5 spec/dircat/cli/command_query_spec.rb