Sha256: e307f536a8c509d31e3bf6a3e00c6c5a2f63c50ead001b1a5b27c9ed4c5b7216

Contents?: true

Size: 858 Bytes

Versions: 3

Compression:

Stored size: 858 Bytes

Contents

# -*- coding: utf-8 -*-
require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper"))

describe CliDirCat do

  before do
    @dir1_dirname             = File.join(TEST_DIR, "dir1")
    @dir2_dirname             = File.join(TEST_DIR, "dir2")
    @certified_output_dirname = File.join(TEST_DIR, "certified_output")
    @tmp_output_dirname       = File.join(TEST_DIR, "tmp")
  end

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

    it "should accept --version option" do
      out = with_stdout_captured do
        args = %w{--version}
        CliDirCat.new.parse_and_execute(args)
      end
      out.should match /#{DirCat::version}/
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dircat-0.1.8 spec/dircat/cli/cli_dircat_spec.rb
dircat-0.1.7 spec/dircat/cli/cli_dircat_spec.rb
dircat-0.1.6 spec/dircat/cli/cli_dircat_spec.rb